:root {
    --ra-bg: #f7f8fb;
    --ra-card: #ffffff;
    --ra-text: #111827;
    --ra-muted: #6b7280;
    --ra-border: #e5e7eb;
    --ra-primary: #2563eb;
    --ra-shadow: 0 10px 35px rgba(15, 23, 42, .08);
    --ra-radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Times New Roman", Times, serif;
    background: var(--ra-bg);
    color: var(--ra-text);
}

a {
    color: inherit;
}

.ra-center-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ra-card {
    width: 100%;
    max-width: 560px;
    background: var(--ra-card);
    border: 1px solid var(--ra-border);
    border-radius: var(--ra-radius);
    box-shadow: var(--ra-shadow);
    padding: 32px;
    text-align: center;
}

.ra-title {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.2;
}

.ra-subtitle {
    margin: 0 0 12px;
    color: var(--ra-muted);
    font-size: 18px;
}

.ra-status {
    color: var(--ra-primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.ra-version {
    direction: ltr;
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 18px;
}

.ra-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ra-btn {
    text-decoration: none;
    border: 1px solid var(--ra-border);
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
}

.ra-toast-container {
    position: fixed;
    z-index: 9999;
    top: 18px;
    inset-inline-end: 18px;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}

.ra-toast {
    background: #111827;
    color: #ffffff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: var(--ra-shadow);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease;
    font-family: "Times New Roman", Times, serif;
}

.ra-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ra-toast-success {
    background: #166534;
}

.ra-toast-error {
    background: #991b1b;
}

.ra-toast-warning {
    background: #92400e;
}

.ra-toast-info {
    background: #1d4ed8;
}

.ra-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .45);
}

.ra-modal-backdrop.is-visible {
    display: flex;
}

.ra-modal {
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--ra-shadow);
    border: 1px solid var(--ra-border);
    padding: 22px;
    font-family: "Times New Roman", Times, serif;
}

.ra-modal-title {
    margin: 0 0 8px;
    font-size: 24px;
    color: var(--ra-text);
}

.ra-modal-body {
    color: var(--ra-muted);
    line-height: 1.7;
}

.ra-admin-body {
    min-height: 100vh;
    background: #f3f4f6;
}

.ra-admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.ra-admin-sidebar {
    background: #111827;
    color: #ffffff;
    padding: 20px;
}

.ra-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    margin-bottom: 18px;
}

.ra-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #2563eb;
    display: grid;
    place-items: center;
    font-weight: bold;
    font-size: 24px;
}

.ra-brand-name {
    font-size: 22px;
    font-weight: bold;
}

.ra-brand-caption {
    color: #9ca3af;
    font-size: 13px;
}

.ra-admin-nav {
    display: grid;
    gap: 8px;
}

.ra-admin-nav a {
    text-decoration: none;
    color: #d1d5db;
    padding: 11px 12px;
    border-radius: 12px;
}

.ra-admin-nav a:hover,
.ra-admin-nav a.is-active {
    color: #ffffff;
    background: rgba(37, 99, 235, .28);
}

.ra-admin-main {
    min-width: 0;
}

.ra-admin-header {
    min-height: 76px;
    background: #ffffff;
    border-bottom: 1px solid var(--ra-border);
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 22px;
}

.ra-menu-toggle {
    border: 1px solid var(--ra-border);
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: "Times New Roman", Times, serif;
    font-size: 20px;
}

.ra-admin-title {
    font-size: 24px;
    font-weight: bold;
}

.ra-admin-subtitle {
    color: var(--ra-muted);
    font-size: 14px;
}

.ra-admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ra-admin-content {
    padding: 22px;
}

.ra-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.ra-stat-card,
.ra-panel {
    background: #ffffff;
    border: 1px solid var(--ra-border);
    border-radius: 18px;
    box-shadow: var(--ra-shadow);
    padding: 20px;
}

.ra-stat-card span {
    color: var(--ra-muted);
}

.ra-stat-card strong {
    display: block;
    font-size: 36px;
    margin-top: 8px;
}

.ra-panel h2 {
    margin-top: 0;
}

@media (max-width: 900px) {
    .ra-admin-shell {
        grid-template-columns: 1fr;
    }

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

    .ra-admin-sidebar.is-open {
        display: block;
    }

    .ra-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ra-admin-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .ra-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.ra-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.ra-page-head h1 {
    margin: 0 0 6px;
    font-size: 30px;
    color: #111827;
}

.ra-page-head p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
}

.ra-empty-state {
    text-align: center;
    padding: 36px 20px;
    color: #374151;
}

.ra-empty-state strong {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
    color: #111827;
}

.ra-empty-state p {
    margin: 0;
    color: #6b7280;
}

.ra-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ra-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.ra-table th,
.ra-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
    vertical-align: middle;
}

.ra-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 700;
}

.ra-table td {
    color: #111827;
}

.ra-table tr:hover td {
    background: #f9fafb;
}

@media (max-width: 720px) {
    .ra-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .ra-page-head .ra-btn {
        justify-content: center;
        width: 100%;
    }
}

.ra-modal-backdrop[data-modal]:not(.is-visible) {
    display: none !important;
    pointer-events: none !important;
}

.ra-modal-backdrop[data-modal].is-visible {
    display: flex !important;
    pointer-events: auto !important;
}

.ra-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    cursor: pointer;
    font-family: "Times New Roman", Times, serif;
    font-size: 22px;
    line-height: 1;
}

.ra-modal-close:hover {
    background: #e5e7eb;
}

.ra-modal {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    padding: 0;
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.ra-modal-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    color: #111827;
    font-size: 24px;
    font-weight: 700;
}

.ra-form {
    padding: 24px;
}

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

.ra-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
}

.ra-form input,
.ra-form textarea,
.ra-form select {
    width: 100%;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f9fafb;
    color: #111827;
    padding: 12px 14px;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ra-form input:focus,
.ra-form textarea:focus,
.ra-form select:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.ra-form textarea {
    resize: vertical;
    min-height: 110px;
}

.ra-form-full {
    grid-column: 1 / -1;
}

.ra-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
}

.ra-btn-light {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;
}

.ra-btn-light:hover {
    background: #e5e7eb !important;
}

.ra-modal-backdrop.is-visible {
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

@media (max-width: 720px) {
    .ra-form-grid {
        grid-template-columns: 1fr;
    }

    .ra-form-actions {
        flex-direction: column;
    }

    .ra-form-actions .ra-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Repairana premium customers page */
.rx-page-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, .45), transparent 34%),
        linear-gradient(135deg, #0f172a, #1d4ed8 58%, #7c3aed);
    box-shadow: 0 22px 55px rgba(30, 64, 175, .24);
    overflow: hidden;
}

.rx-hero-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rx-hero-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 34px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
}

.rx-page-hero h1 {
    margin: 0 0 7px;
    font-size: 34px;
    letter-spacing: -.5px;
}

.rx-page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 17px;
    max-width: 680px;
}

.rx-primary-btn,
.rx-soft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 16px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.rx-primary-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .28);
}

.rx-primary-btn:hover,
.rx-soft-btn:hover {
    transform: translateY(-1px);
}

.rx-soft-btn {
    background: #f8fafc;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.rx-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.rx-stat-card {
    position: relative;
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
    overflow: hidden;
}

.rx-stat-card:before {
    content: "";
    position: absolute;
    inset-inline-end: -28px;
    top: -28px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    opacity: .16;
}

.rx-blue:before { background: #2563eb; }
.rx-green:before { background: #059669; }
.rx-purple:before { background: #7c3aed; }
.rx-orange:before { background: #f97316; }

.rx-stat-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #f8fafc;
    margin-bottom: 14px;
    font-size: 22px;
}

.rx-stat-card span {
    display: block;
    color: #64748b;
    font-size: 15px;
    margin-bottom: 6px;
}

.rx-stat-card strong {
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
}

.rx-toolbar,
.rx-panel {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 26px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.rx-toolbar {
    padding: 16px;
    margin-bottom: 18px;
}

.rx-search-form {
    display: grid;
    grid-template-columns: 1fr 180px auto auto;
    gap: 12px;
}

.rx-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 0 14px;
}

.rx-search-box input,
.rx-search-form select {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    color: #111827;
}

.rx-search-form select {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 0 12px;
    background: #f8fafc;
}

.rx-panel {
    padding: 20px;
}

.rx-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.rx-panel-head h2 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 26px;
}

.rx-panel-head p {
    margin: 0;
    color: #64748b;
}

.rx-badge,
.rx-pill,
.rx-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}

.rx-badge {
    color: #1d4ed8;
    background: #dbeafe;
}

.rx-pill {
    color: #4338ca;
    background: #eef2ff;
}

.rx-status.is-active {
    color: #047857;
    background: #d1fae5;
}

.rx-status.is-muted {
    color: #475569;
    background: #e2e8f0;
}

.rx-table-wrap {
    overflow-x: auto;
}

.rx-table {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.rx-table th {
    color: #64748b;
    font-size: 14px;
    padding: 8px 14px;
    text-align: right;
}

.rx-table td {
    background: #ffffff;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    padding: 14px;
    color: #111827;
    vertical-align: middle;
}

.rx-table td:first-child {
    border-inline-start: 1px solid #eef2f7;
    border-radius: 18px 0 0 18px;
}

.rx-table td:last-child {
    border-inline-end: 1px solid #eef2f7;
    border-radius: 0 18px 18px 0;
}

.rx-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rx-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    color: #1d4ed8;
    font-size: 24px;
    font-weight: 700;
}

.rx-person strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
}

.rx-person small {
    color: #64748b;
}

.rx-actions {
    display: flex;
    gap: 7px;
}

.rx-actions button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 16px;
}

.rx-actions button:hover {
    background: #e0ecff;
}

.rx-empty {
    text-align: center;
    padding: 54px 20px;
}

.rx-empty-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 28px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    font-size: 38px;
}

.rx-empty h3 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #0f172a;
}

.rx-empty p {
    margin: 0 auto 18px;
    max-width: 520px;
    color: #64748b;
    font-size: 17px;
}

.rx-modal-title small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 15px;
    font-weight: 400;
}

.rx-modal-backdrop.is-visible {
    background: rgba(15, 23, 42, .45);
}

@media (max-width: 1100px) {
    .rx-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rx-search-form {
        grid-template-columns: 1fr 160px;
    }
}

@media (max-width: 720px) {
    .rx-page-hero,
    .rx-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .rx-stat-grid,
    .rx-search-form {
        grid-template-columns: 1fr;
    }

    .rx-primary-btn,
    .rx-soft-btn {
        width: 100%;
    }

    .rx-page-hero h1 {
        font-size: 30px;
    }
}
