:root {
    --primary: #137F78;
    --primary-dark: #0b8a89;
    --secondary: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

/* Client Portal Layout */
.rg-client-portal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.rg-portal-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar Styles */
.rg-portal-sidebar {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0;
    overflow: hidden;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.rg-sidebar-header {
    background: linear-gradient(135deg, #137F78, var(--primary-dark));
    color: white;
    padding: 25px;
    text-align: center;
    margin-bottom: 0;
}

.rg-sidebar-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.rg-sidebar-tabs {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.rg-sidebar-tab {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    background: white;
}

.rg-sidebar-tab:hover {
    background: var(--light);
    color: #137F78;
}

.rg-sidebar-tab.active {
    background: #137F78;
    color: white;
    border-left: 4px solid var(--primary-dark);
}

.rg-sidebar-tabs .active .rg-tab-text strong {
    color: white !important;
}

.rg-sidebar-tab.active .rg-tab-text small {
    color: rgba(255, 255, 255, 0.8);
}

.rg-tab-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rg-tab-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: black;
}

.rg-tab-text strong:active {
    color: #fff !important;
}

.rg-tab-text small {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.8;
}

.rg-sidebar-logout {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
}

.rg-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--danger);
    color: white !important;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.rg-logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Main Content Area */
.rg-portal-main {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0;
    overflow: hidden;
    width: 100%;
    min-height: 600px;
}

.rg-main-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.rg-main-header h2 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 1.8rem;
    font-weight: 700;
}

.rg-main-header p {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
}

/* Back Button */
.rg-back-button {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
}

.rg-back-button, .rg-btn-outline     {
    align-items: center;
    text-decoration: none;
}

/* Detailed Order View */
.rg-detailed-order-view {
    padding: 0;
}

.rg-detailed-order {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.rg-order-summary,
.rg-detailed-items,
.rg-billing-info,
.rg-detailed-documents {
    background: var(--light);
    padding: 25px;
    border-radius: var(--radius);
}

.rg-order-summary h4,
.rg-detailed-items h4,
.rg-billing-info h4,
.rg-detailed-documents h4 {
    margin: 0 0 20px 0;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
}

.rg-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.rg-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.rg-summary-item:last-child {
    border-bottom: none;
}

.rg-detailed-items {
    display: flex;
    flex-direction: column;
}

.rg-detailed-item {
    background: white;
    padding: 20px;
    margin: 5px 0;
    border-radius: var(--radius);
    border-left: 4px solid #137F78;
}

.rg-detailed-item h5 {
    margin: 0 0 15px 0;
    color: var(--text);
    font-size: 1.1rem;
}

.rg-item-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 10px 0px;
}

.rg-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rg-detail-item.full-width {
    grid-column: 1 / -1;
}

.rg-detail-item strong {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
}

.rg-services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.rg-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--light);
    border-radius: 4px;
}

.rg-address-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.rg-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.rg-document-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.rg-document-icon {
    font-size: 2rem;
}

.rg-document-info {
    flex: 1;
}

.rg-document-info h6 {
    margin: 0 0 5px 0;
    color: var(--text);
    font-size: 1rem;
}

.rg-document-info p {
    margin: 2px 0;
    color: var(--text-light);
    font-size: 0.8rem;
}

.rg-document-actions {
    display: flex;
    gap: 8px;
}

/* Orders Grid */
.rg-orders-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px 0;
}

.rg-order-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.rg-order-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.rg-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.rg-order-title h4 {
    margin: 0 0 5px 0;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
}

.rg-order-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.rg-order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-on-hold {
    background: #f3e8ff;
    color: #6b21a8;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* Container Items */
.rg-container-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.rg-container-item {
    background: var(--light);
    padding: 15px;
    border-radius: var(--radius);
    border-left: 4px solid #137F78;
}

.rg-item-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.1rem;
}

.rg-item-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 15px 0px;
}

.rg-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rg-detail-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

.rg-detail-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.rg-service-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 2px 4px 2px 0;
}

/* Order Meta */
.rg-order-details {
    margin-bottom: 20px;
}

.rg-order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.rg-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--light);
    border-radius: var(--radius);
}

.rg-meta-label {
    font-weight: 600;
    color: var(--text);
}

.rg-meta-value {
    color: #137F78;
    font-weight: 700;
}

/* Uploaded Documents */
.rg-uploaded-documents {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.rg-uploaded-documents h5 {
    margin: 0 0 15px 0;
    color: var(--text);
    font-size: 1rem;
}

.rg-documents-list {
    display: flex;
    /* flex-direction: column; */
    gap: 10px;
    flex-wrap: wrap;
}

.rg-document-icon {
    font-size: 1.2rem;
}

.rg-document-name {
    font-size: xx-small;
    padding: 10px 0;
    color: var(--text);
}

.rg-document-meta {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-left: auto;
}

.rg-btn-small {
    padding: 6px 12px;
    background: #137F78;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.rg-btn-small:hover {
    background: var(--primary-dark);
    color: white;
}

.rg-btn-danger {
    padding: 6px 12px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rg-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.rg-btn-danger:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Order Actions */
.rg-order-actions {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.rg-btn-primary,
.rg-btn-outline {
    padding: 10px 15px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
    /* display: inline-flex; */
    align-items: center;
    gap: 8px;
    
}

.rg-btn-primary {
    background: #137F78;
    color: white !important;
}
.rg-btn-primary a {
    background: #137F78;
    color: white !important;
}

.rg-btn-primary:hover {
    background: var(--primary-dark);
    color: white !important;
    transform: translateY(-2px);
}

.rg-btn-primary:active {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.rg-btn-outline {
    background: transparent;
    border: 2px solid #137F78;
    color: #137F78;
}

.rg-btn-outline:hover {
    background: #137F78;
    color: white;
    transform: translateY(-2px);
}

/* Customer Details Form */
.rg-customer-details {
    padding: 30px;
}

.rg-profile-form {
    max-width: 100%;
}

.rg-form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--light);
    border-radius: var(--radius);
}

.rg-form-section h3 {
    margin: 0 0 20px 0;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
}

.rg-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.rg-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 auto;
}

.rg-form-group.full-width {
    grid-column: 1 / -1;
}

.rg-form-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.rg-form-control {
    transition: all 0.3s ease;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rg-products-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

.rg-form-control:focus {
    outline: none;
    border-color: #137F78;
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1);
}



/* No Data States */
.rg-no-data {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-light);
}

.no-data-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.rg-no-data h4 {
    margin: 0 0 10px 0;
    color: var(--text);
    font-size: 1.3rem;
}

.rg-no-data p {
    margin: 0 0 25px 0;
    font-size: 1rem;
}

/* Upload Form */
.rg-upload-form-container {
    margin-top: 20px;
    padding: 10px 5px;
    background: var(--light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.rg-upload-form h5 {
    margin: 0 0 15px 0;
    color: var(--text);
    font-size: 1.1rem;
}

.rg-file-upload {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.rg-file-upload:hover {
    border-color: #137F78;
}

.rg-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.rg-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.rg-upload-text {
    font-weight: 600;
    color: var(--text);
}

.rg-upload-hint {
    color: var(--text-light);
    font-size: 0.9rem;
}


.rg-upload-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.rg-upload-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.rg-upload-status.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.rg-upload-loading {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* File List */
.rg-file-list {
    margin-top: 10px;
}

.rg-file-list-header {
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.rg-file-item {
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
    border-left: 3px solid #137F78;
}

/* Payment Slip Styles */
.rg-status-completed {
    color: #10b981;
    font-weight: 600;
}

.rg-status-pending {
    color: #f59e0b;
    font-weight: 600;
}

.rg-upload-info {
    background: #f0f9ff;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #0ea5a4;
    margin-bottom: 15px;
    font-size: 14px;
}

.rg-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px dashed #e2e8f0;
    display: none;
}

.rg-file-preview.has-preview {
    display: block;
}

/* Login Form */
.rg-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.rg-login-form {
    background: white;
    padding: 0;
    border-radius: var(--radius);

    width: 100%;
    max-width: 450px;
    text-align: center;
}

.rg-login-form h2 {
    margin: 0 0 10px 0;
    color: var(--text);
    font-size: 1.5rem;
}

.rg-login-form p {
    margin: 0 0 30px 0;
    color: var(--text-light);
}

.rg-login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9rem;
}

.rg-login-links a {
    color: #137F78;
    text-decoration: none;
}

.rg-login-links a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.rg-client-dashboard {
    padding: 30px;
}

.rg-welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.rg-welcome-section h2 {
    color: var(--text);
    margin-bottom: 10px;
}

.rg-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.rg-stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 4px solid #137F78;
}

.rg-stat-content h3 {
    font-size: 2rem;
    margin: 0;
    color: #137F78;
}

.rg-quick-actions {
    margin-bottom: 40px;
}

.rg-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.rg-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.rg-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #137F78;
}

.rg-action-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.rg-recent-orders {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rg-recent-order {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Modal Styles */
.rg-document-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.rg-document-modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rg-document-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: #137F78;
    color: white;
}

.rg-document-modal-title {
    margin: 0;
    color: white;
}

.rg-document-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rg-document-modal-body {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.rg-document-modal-body iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.rg-document-modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Confirmation Dialog */
.rg-confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.rg-confirm-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.rg-confirm-title {
    margin: 0 0 15px 0;
    color: var(--text);
}

.rg-confirm-message {
    margin: 0 0 25px 0;
    color: var(--text-light);
}

.rg-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rg-btn-cancel {
    padding: 10px 20px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.rg-btn-confirm {
    padding: 10px 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

/* Notifications */
.rg-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    z-index: 10002;
    box-shadow: var(--shadow);
}

.rg-notification-success {
    background: var(--success);
}

.rg-notification-error {
    background: var(--danger);
}

.rg-notification-info {
    background: #137F78;
}



/* ✅ IMPROVED LOGIN FORM STYLES */
.rg-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* WooCommerce login form styling */
.rg-login-form .woocommerce-form-login {
    text-align: left;
}

.rg-login-form .form-row {
    margin-bottom: 20px;
}

.rg-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.rg-login-form input[type="text"],
.rg-login-form input[type="password"],
.rg-login-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.rg-login-form input:focus {
    outline: none;
    border-color: #137F78;
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1);
}

.rg-login-form .woocommerce-form-login__submit {
    width: 100%;
    padding: 15px;
    background: #137F78;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.rg-login-form .woocommerce-form-login__submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.rg-login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9rem;
}

.rg-login-links a {
    color: #137F78;
    text-decoration: none;
    font-weight: 600;
}

.rg-login-links a:hover {
    text-decoration: underline;
}

/* WordPress default login form styling */
.rg-login-form .login-form {
    text-align: left;
}

.rg-login-form .login-username,
.rg-login-form .login-password {
    margin-bottom: 20px;
}

.rg-login-form .login-submit {
    margin-bottom: 20px;
}

.rg-login-form .login-remember {
    margin-bottom: 15px;
}

/* ✅ LOGIN/REGISTRATION TAB SYSTEM */
.rg-login-tabs {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
}

.rg-tab-headers {
    display: flex;
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

.rg-tab-header {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
}

.rg-tab-header.active {
    color: #137F78;
    border-bottom-color: #137F78;
    background: white;
}

.rg-tab-header:hover:not(.active) {
    background: rgba(14, 165, 164, 0.1);
    color: #137F78;
}

.rg-tab-content {
    display: none;
    padding: 40px;
}

.rg-tab-content.active {
    display: block;
}

/* ✅ REGISTRATION FORM STYLES */
.rg-register-form h2 {
    margin: 0 0 10px 0;
    color: var(--text);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.rg-register-form p {
    margin: 0 0 30px 0;
    color: var(--text-light);
    text-align: center;
    font-size: 1rem;
}

.rg-register-form-inner {
    text-align: left;
}

.rg-register-form .rg-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.rg-register-form .rg-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rg-register-form .rg-form-group.full-width {
    width: 100%;
}

.rg-register-form label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.rg-register-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rg-register-form input:focus {
    outline: none;
    border-color: #137F78;
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1);
}

.rg-register-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rg-register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.rg-generate-btn {
    background: #F28526;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

/* ✅ WOOCOMMERCE LOGIN FORM STYLING */
.rg-login-form .woocommerce-form-login {
    text-align: left;
}

.rg-login-form .form-row {
    margin-bottom: 20px;
}

.rg-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.rg-login-form input[type="text"],
.rg-login-form input[type="password"],
.rg-login-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rg-login-form input:focus {
    outline: none;
    border-color: #137F78;
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1);
}

.rg-login-form .woocommerce-form-login__submit {
    width: 100%;
    padding: 15px;
    background: #137F78;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.rg-login-form .woocommerce-form-login__submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.rg-login-links {
    text-align: center;
    margin-top: 20px;
}

.rg-login-links a {
    color: #137F78;
    text-decoration: none;
    font-weight: 600;
}

.rg-login-links a:hover {
    text-decoration: underline;
}



/* Extension */
.rg-extension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rg-add-extension-btn button {
    padding: 12px 20px;
    background: #137F78;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin: 10px 0px 10px 10px;
}

.rg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.rg-modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.rg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.rg-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.rg-price-box {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #137F78;
}

.rg-price-box h4 {
    margin: 0 0 15px 0;
    color: #137F78;
}

.selected-products-breakdon {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.rg-extension-cost {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 15px;
}

.rg-extension-cost p {
    margin: 8px 0;
}

.rg-extension-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0ea5a4;
    margin: 15px 0;
}

.rg-summary-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.rg-total-price {
    border-top: 2px solid #0ea5a4;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.1em;
    color: #0ea5a4;
}

.rg-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rg-requests-flex {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.woocommerce-page form .form-row-first {
    width: 100% !important;
}

.woocommerce-page form .form-row-last {
    width: 100% !important;
}



/* ✅ FIXED: Upload preview styling */
.rg-file-upload-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.rg-file-input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.rg-upload-label {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rg-upload-label:hover {
    background: #e9ecef;
    border-color: #0ea5a4;
}

.rg-file-selected .rg-upload-label {
    background: #e7f3ff;
    border-color: #0ea5a4;
    border-style: solid;
}

.rg-upload-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.rg-upload-text {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.rg-upload-hint {
    display: block;
    font-size: 12px;
    color: #6c757d;
}

/* File preview */
.rg-file-preview {
    margin-top: 10px;
}

.rg-file-preview-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.rg-preview-thumbnail {
    width: 60px;
    height: 60px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: #f8fafc;
}

.rg-preview-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.rg-preview-icon {
    font-size: 32px;
    width: 60px;
    text-align: center;
    margin-right: 10px;
}

.rg-preview-info {
    flex: 1;
}

.rg-file-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 3px;
    word-break: break-all;
}

.rg-file-size {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 3px;
}

.rg-file-status {
    font-size: 11px;
    font-weight: 600;
}

.rg-status-ready {
    color: #28a745;
}

.rg-status-uploading {
    color: #007bff;
}

/* Upload Status Messages */
.rg-upload-status-small {
    margin-top: 5px;
    font-size: 12px;
}

.rg-success-small {
    color: #28a745;
    font-weight: 600;
}

.rg-error-small {
    color: #dc3545;
    font-weight: 600;
}

/* Progress Bar */
.rg-upload-progress {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.rg-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.rg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5a4, #22d3ee);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rg-progress-text {
    font-size: 12px;
    color: #6c757d;
}

.rg-progress-percentage {
    font-weight: 600;
    color: #0ea5a4;
}

/* Notification */
.rg-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}

/* Required field indicator */
/* .rg-form-label:after {
    content: " *";
    color: #dc3545;
} */

/* Document display styles */
.rg-document-group {
    padding: 5px;
    background: #f8f9fa;
    border-radius: 8px;
    /* border-left: 4px solid #0ea5a4; */
}

.rg-document-group h6 {
    margin: 0 0 10px 0;
    color: #0EA5A4;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rg-document-item {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.rg-document-item:hover {
    border-color: #0ea5a4;
    box-shadow: 0 2px 8px rgba(14, 165, 164, 0.1);
}

.rg-document-info {
    flex: 1;
    min-width: 0;
    /* For text overflow */
}

.rg-document-icon {
    font-size: 20px;
    margin-right: 10px;
    vertical-align: middle;
}


.rg-doc-required {
    background: #ffc107;
    color: #856404;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

.rg-document-meta {
    display: block;
    font-size: 11px;
    color: #6c757d;
    margin-top: 3px;
}

.rg-document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.rg-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.rg-btn-small:first-child {
    background: #0ea5a4;
    color: white;
}

.rg-btn-small:first-child:hover {
    background: #0c8a8a;
}

.rg-btn-small:nth-child(2) {
    background: #6c757d;
    color: white;
}

.rg-btn-small:nth-child(2):hover {
    background: #5a6268;
}

.rg-btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rg-btn-danger:hover {
    background: #c82333;
}

/* Upload form improvements */
.rg-upload-form {
    max-height: 80vh;
    overflow-x: hidden;
    padding-right: 10px;
}

.rg-upload-form::-webkit-scrollbar {
    width: 6px;
}

.rg-upload-form::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.rg-upload-form::-webkit-scrollbar-thumb {
    background: #0ea5a4;
    border-radius: 3px;
}

.rg-upload-form::-webkit-scrollbar-thumb:hover {
    background: #0c8a8a;
}

/* Required field styles */
.rg-form-label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.rg-form-req-label:after {
    content: " *";
    color: #dc3545;
}


.rg-extension-badge {
    display: inline-block;
    margin-left: 15px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.rg-extension-badge.extension {
    background: #e7f3ff;
    color: #007cba;
    border-left: 3px solid #007cba;
}

.rg-extension-badge.parent {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}


.rg-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rg-progress-header h5 {
    margin: 0;
    color: #007cba;
    font-size: 16px;
}

.rg-current-status {
    background: #e7f3ff;
    color: #007cba;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.rg-progress-track {
    position: relative;
    margin: 20px 0;
}

.rg-progress-bar {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    z-index: 1;
}

.rg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5E14, #FF5E14);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.rg-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.rg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-align: center;
}

.rg-step-icon {
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rg-step.active .rg-step-icon {
    background: #FF5E14;
    color: white;
    border-color: #FF5E14;
    transform: scale(1.1);
}

.rg-step.completed .rg-step-icon {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.rg-step-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
    font-weight: 500;
}

.rg-step-date {
    font-size: 10px;
    color: #999;
    min-height: 12px;
}

.rg-progress-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.rg-status-message {
    background: white;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid;
    font-size: 14px;
}

.rg-status-message.on-hold {
    border-left-color: #ffc107;
    color: #856404;
}

.rg-status-message.processing {
    border-left-color: #007cba;
    color: #004085;
}

.rg-status-message.completed {
    border-left-color: #28a745;
    color: #155724;
}

.rg-status-message.delivered {
    border-left-color: #17a2b8;
    color: #0c5460;
}

/************************/
/* ✅ IMPROVED: MY DETAILS PAGE SPECIFIC STYLES - FIXED */
.rg-customer-details {
    padding: 30px !important;
    background: white !important;
    min-height: 500px;
}

.rg-profile-form {
    max-width: 100% !important;
    width: 100% !important;
}

.rg-form-section {
    margin-bottom: 30px !important;
    padding: 25px !important;
    background: var(--light) !important;
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.rg-form-section h3 {
    margin: 0 0 20px 0 !important;
    color: var(--text) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #137F78 !important;
}

/* ✅ FORM GRID - FIXED */
.rg-form-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
}

/* ✅ FORM GROUPS - FIXED */
.rg-form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
}

.rg-form-group.full-width {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

/* ✅ LABELS - FIXED */
.rg-customer-details .rg-form-group label {
    font-weight: 600 !important;
    color: var(--text) !important;
    font-size: 0.95rem !important;
    display: block !important;
    margin-bottom: 5px !important;
}

.rg-customer-details .rg-form-label:after {
    content: " *" !important;
    color: var(--danger) !important;
}

/* ✅ INPUT FIELDS - FIXED */
.rg-customer-details .rg-form-group input,
.rg-customer-details .rg-form-group select {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    background: white !important;
    color: var(--text) !important;
}

.rg-customer-details .rg-form-group input:focus,
.rg-customer-details .rg-form-group select:focus {
    outline: none !important;
    border-color: #137F78 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.1) !important;
}

/* ✅ SELECT DROPDOWN - FIXED */
.rg-customer-details .rg-form-group select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23137F78' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

/* ✅ SMALL TEXT - FIXED */
.rg-customer-details .rg-form-group small {
    color: #666 !important;
    font-size: 12px !important;
    display: block !important;
    margin-top: 4px !important;
}

/* ✅ FORM ACTIONS - FIXED */
.rg-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 10px;
}

.rg-customer-details .rg-btn-primary,
.rg-customer-details .rg-btn-outline,.rg-customer-details .rental-agreement{
    padding: 14px 28px !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    font-size: 1rem !important;
    /* display: inline-flex !important; */
    align-items: center !important;
    gap: 10px !important;
    min-width: 150px !important;
    justify-content: center !important;
}

.rg-customer-details .rg-btn-primary {
    background: #137F78 !important;
    color: white !important;
}

.rg-customer-details .rg-btn-primary:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-hover) !important;
}

.rg-customer-details .rg-btn-outline {
    background: transparent !important;
    border: 2px solid #137F78 !important;
    color: #137F78 !important;
}

.rg-customer-details .rg-btn-outline:hover {
    background: #137F78 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-hover) !important;
}

/* ✅ VALIDATION STYLES */
.rg-customer-details input:invalid,
.rg-customer-details select:invalid {
    border-color: var(--danger) !important;
}

.rg-customer-details input:valid,
.rg-customer-details select:valid {
    border-color: var(--success) !important;
}

/* ✅ PLACEHOLDER STYLING */
.rg-customer-details input::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.rg-customer-details input:-ms-input-placeholder {
    color: #999 !important;
}

.rg-customer-details input::-ms-input-placeholder {
    color: #999 !important;
}

/****************/
/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Disabled state for form */
#rg-extension-form:disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Prevent double click on buttons */
button[data-submitting="true"] {
    position: relative;
}

button[data-submitting="true"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

/* Delete Button Styles */
.delete-document-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.delete-document-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.delete-document-btn:active {
    transform: scale(0.95);
}

/* Document preview container */
.document-preview-container {
    position: relative;
    display: inline-block;
    margin: 10px;
    width: 120px;
    text-align: center;
    vertical-align: top;
}

/* Image styling */
.document-preview-container img {
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 5px;
    background: white;
    transition: all 0.3s ease;
}

.document-preview-container img:hover {
    border-color: #137F78;
    transform: translateY(-2px);
}

/* Document name */
.document-name {
    font-size: 12px;
    color: #333;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-weight: 500;
    word-break: break-all;
    line-clamp: 2;
}

/* Document date */
.document-date {
    font-size: 10px;
    color: #666;
    margin-top: 2px;

}

/***********/
/* Service and Accessory Tags */
.rg-service-tag {
    display: inline-block;
    background: #f0f7ff;
    border: 1px solid #c2d9ff;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px 4px 2px 0;
    font-size: 12px;
    color: #2c5282;
}

/* Services List in Detailed View */
.rg-services-list {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.rg-service-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
}

.rg-service-item:last-child {
    border-bottom: none;
}

.rg-service-item span:first-child {
    color: #495057;
}

.rg-service-item span:last-child {
    color: #137F78;
    font-weight: 600;
}

/* Force visible styles - Temporary fix */
#register-form-status {
    display: block !important;
    margin-top: 10px !important;
}

.rg-error-message {
    color: #ff0000 !important;
    background-color: #ffcccc !important;
    border: 2px solid red !important;
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

.rg-loading-message {
    color: #0000ff !important;
    background-color: #cce5ff !important;
    padding: 15px !important;
    border-radius: 10px;
    font-size: 16px !important;
}

/* Add to your CSS file */
.rg-document-options {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.rg-option-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rg-option-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rg-option-btn.use-all {
    background: #28a745;
    color: white;
}

.rg-option-btn.upload-new {
    background: #007cba;
    color: white;
}

.rg-option-btn.select-specific {
    background: #6c757d;
    color: white;
}

.rg-document-source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.rg-source-profile {
    background: #28a745;
    color: white;
}

.rg-source-custom {
    background: #007cba;
    color: white;
}

.rg-active-extensions {
    margin-top: 20px;
}

.rg-main-header-extension {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.rg-extension-requests-grid {
    display: grid;
    gap: 15px;
}

.rg-active-extensions h3 {
    color: #137F78;
    margin-bottom: 15px;
}

.rg-use-profile-docs-option {
    margin-bottom: 30px;
}

/****************************/
/* Responsive Design */
@media (max-width: 1024px) {
    .rg-portal-layout {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .rg-client-portal {
        padding: 15px;
    }

    .rg-portal-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rg-portal-sidebar {
        position: static;
    }

    .rg-main-header {
        padding: 25px 20px;
    }

    .rg-detailed-order {
        padding: 20px;
    }

    .rg-orders-grid {
        padding: 10px;
    }

    .rg-order-card {
        padding: 15px;
    }

    .rg-order-header {
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
    }

    .rg-order-actions {
        flex-direction: column;
    }

    .rg-btn-primary,
    .rg-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .rg-customer-details {
        padding: 20px;
    }

    .rg-form-grid {
        grid-template-columns: 1fr;
    }

    .rg-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .rg-action-buttons {
        grid-template-columns: 1fr;
    }

    .rg-login-tabs {
        margin: 0 15px;
    }

    .rg-tab-content {
        padding: 30px 25px;
    }

    .rg-tab-header {
        padding: 15px;
        font-size: 1rem;
    }

    .rg-customer-details {
        padding: 20px !important;
    }

    .rg-form-section {
        padding: 20px !important;
    }

    .rg-form-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .rg-form-actions {
        flex-direction: column !important;
    }

    .rg-customer-details .rg-btn-primary,
    .rg-customer-details .rg-btn-outline {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .rg-client-portal {
        padding: 10px;
    }

    .rg-main-header {
        padding: 20px 15px;
    }

    .rg-main-header h2 {
        font-size: 1.5rem;
    }

    .rg-detailed-order {
        padding: 15px;
        gap: 20px;
    }

    .rg-order-summary,
    .rg-detailed-items,
    .rg-billing-info,
    .rg-detailed-documents {
        padding: 20px;
    }

    .rg-orders-grid {
        padding: 15px;
    }

    .rg-order-card {
        padding: 5px;
    }

    .rg-item-details {
        grid-template-columns: 1fr;
    }

    .rg-order-meta {
        grid-template-columns: 1fr;
    }

    .rg-summary-grid {
        grid-template-columns: 1fr;
    }

    .rg-documents-grid {
        grid-template-columns: 1fr;
    }

    .rg-customer-details {
        padding: 15px;
    }

    .rg-form-section {
        padding: 20px;
    }

    .rg-login-form {
        padding: 30px 20px;
    }

    .rg-dashboard-stats {
        grid-template-columns: 1fr;
    }

    .rg-tab-content {
        padding: 25px 20px;
    }

    .rg-register-form h2,
    .rg-login-form h2 {
        font-size: 1.5rem;
    }

    .rg-customer-details {
        padding: 15px !important;
    }

    .rg-form-section {
        padding: 15px !important;
    }

    .rg-form-section h3 {
        font-size: 1.2rem !important;
    }

    .rg-customer-details .rg-btn-primary,
    .rg-customer-details .rg-btn-outline {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }

    .rg-main-header-extension {
        display: flow;
        align-items: center;
        margin-bottom: 30px;
    }
}

/*********** Policy Modal Styles **************/

/* Policy Modal Styles */
.policy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.7) !important;
}
.policy-modal.policy-modal-open {
    display: flex !important;
}
.policy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.policy-modal-content {
    position: relative;
    background: white;
    margin: 50px auto;
    width: 99%;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.policy-nav-btn.primary {
    background: #137F78;
    color: white;
}

.policy-nav-btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.policy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 16px;
    border-bottom: 2px solid #f1f5f9;
    background: linear-gradient(135deg, #0ea5a4, #137F78);
    color: white;
    border-radius: 12px 12px 0 0;
}

.policy-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.policy-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.policy-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.policy-modal-body {
    padding: 25px;
    overflow-y: auto;
    background: #f8fafc;
}

.policy-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.policy-content h4 {
    color: #0ea5a4;
    margin: 20px 0 10px 0;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.policy-content h4:first-child {
    margin-top: 0;
}

.policy-content p {
    margin-bottom: 15px;
    color: #4b5563;
}

.policy-content ul,
.policy-content ol {
    margin: 10px 0 15px 20px;
    color: #4b5563;
}

.policy-content li {
    margin-bottom: 8px;
}

.policy-content .highlight {
    background: #fff3cd;
    padding: 10px 15px;
    border-left: 4px solid #ffc107;
    margin: 15px 0;
    border-radius: 4px;
}

.policy-modal-footer {
    padding: 5px 5px;
    border-top: 1px solid #e2e8f0;
    background: white;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.policy-acceptance {
    align-items: center;
    gap: 10px;
}

.policy-checkbox {
    transform: scale(1.2);
    accent-color: #137F78;
    cursor: pointer;
}

.policy-acceptance label {
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    flex: 1;
}

.policy-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.policy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    min-width: 300px;
    max-width: 400px;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999999;
    border-left: 4px solid #0ea5a4;
}

.policy-toast.error {
    border-left-color: #ef4444;
}

.policy-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #334155;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-close:hover {
    background: #f1f5f9;
}

.policies-acceptance-section {
    margin: 25px 0;
    padding: 10px;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 2px solid #e2e8f0;
    animation: fadeIn 0.5s ease;
}

.policies-acceptance-section h3 {
    color: #137F78;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.policies-acceptance-section h3::before {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .policy-modal-content {
        margin: 20px auto;
        width: 95%;
        max-height: 90vh;
    }

    .policy-modal-footer {
        flex-direction: column;
    }

    .policy-actions {
        flex-direction: column;
    }
}

.policy-link {
    cursor: pointer !important;
}

.policy-link:hover {
    color: #137F78 !important;
    text-decoration: underline !important;
}

.policy-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 5px;
}

.policy-steps {
    display: flex;
    align-items: center;
    gap: 10px;
}

.policy-step {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}

.policy-step.active {
    background: #137F78;
    transform: scale(1.2);
}

.policy-step.completed {
    background: #10b981;
}

.policy-nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.policy-nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    background: var(--light);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.policy-nav-btn:hover:not(:disabled) {
    background: var(--border);
}

.policy-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.policy-nav-btn.primary {
    background: #137F78;
    color: white;
}

.policy-nav-btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.policy-close-btn {
    background: var(--secondary);
    color: white;
}

.policy-close-btn:hover {
    background: #475569;
}

.typed-signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 24px;
    color: var(--text);
    padding: 10px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.signature-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    backdrop-filter: blur(10px);
}

.lock-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: #137F78;
    border-radius: var(--radius);
}

.lock-content button {
    margin-top: 20px;
    padding: 12px 24px;
    background: white;
    color: black !important;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}

.signature-notification {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-counter {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
    text-align: center;
}

#signatureCanvas {
    width: 500px !important;
    max-width: -webkit-fill-available !important;
    height: 200px !important;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}

.signature-canvas-container {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

.signature-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 0 10px;
}

.signature-controls button {
    padding: 8px 16px;
    font-size: 14px;
}

#signatureStatus {
    font-size: 14px;
    font-weight: 500;
}

.policy-modal-content.signature-mode {
    width: 50% !important;
    max-width: 600px;
    margin: 50px auto;
    height: auto;
}

@media (max-width: 768px) {
    .policy-modal-content.signature-mode {
        width: 90% !important;
        margin: 20px auto;
        height: auto;
    }

    .policy-modal-footer {
        padding: 15px;
    }

    .signature-controls {
        flex-direction: column;
    }

    #clearSignature,
    #undoSignature {
        width: 100%;
        margin-bottom: 8px;
    }

    input[type="checkbox"] {
        transform: scale(1.2);
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .policy-acceptance label {
        font-size: 14px;
    }

    .signature-canvas-container {
        margin: 10px 0;
    }
}

/***************************/