/* ============================================
   RIWAJ FOOD — Registration Pages CSS
   ============================================ */

/* --- Layout --- */
.rf-register-page {
    background: var(--rf-bg-light, #FFF8F3);
    min-height: 80vh;
    padding: 40px 0 60px;
}

.rf-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.rf-container.rf-narrow {
    max-width: 600px;
}

/* --- Form Header --- */
.rf-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.rf-form-header h1 {
    color: #2C1810;
    font-size: 28px;
    margin: 0 0 8px;
}

.rf-form-header p {
    color: #8B6550;
    font-size: 16px;
    margin: 0;
}

.rf-back-link {
    display: inline-block;
    color: #8B6550;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
}

.rf-back-link:hover {
    color: #D4511E;
}

/* ============================================
   REGISTRATION CHOICE PAGE
   ============================================ */

.rf-choice-header {
    text-align: center;
    margin-bottom: 40px;
}

.rf-choice-header h1 {
    color: #2C1810;
    font-size: 32px;
    margin: 0 0 8px;
}

.rf-choice-header p {
    color: #8B6550;
    font-size: 18px;
    margin: 0;
}

.rf-choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.rf-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #FFFFFF;
    border: 2px solid #FFF0E5;
    border-radius: 16px;
    padding: 40px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rf-choice-card:hover {
    border-color: #D4511E;
    background: #FFF0E5;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 81, 30, 0.12);
}

.rf-choice-icon {
    margin-bottom: 16px;
}

.rf-choice-card h2 {
    color: #2C1810;
    font-size: 22px;
    margin: 0 0 8px;
}

.rf-choice-card p {
    color: #5C3D2E;
    font-size: 15px;
    margin: 0 0 20px;
}

.rf-choice-btn {
    display: inline-block;
    background: #D4511E;
    color: #FFFFFF;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
}

.rf-choice-card:hover .rf-choice-btn {
    background: #E8722D;
}

.rf-choice-footer {
    text-align: center;
    color: #8B6550;
}

.rf-choice-footer a {
    color: #D4511E;
    font-weight: 600;
}

/* ============================================
   FORM STYLES
   ============================================ */

.rf-form {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.06);
}

.rf-field {
    margin-bottom: 20px;
}

.rf-field label {
    display: block;
    color: #2C1810;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.rf-required {
    color: #C62828;
}

.rf-optional {
    color: #8B6550;
    font-weight: 400;
    font-size: 12px;
}

.rf-field input[type="text"],
.rf-field input[type="email"],
.rf-field input[type="tel"],
.rf-field input[type="password"],
.rf-field input[type="number"],
.rf-field input[type="date"],
.rf-field input[type="url"],
.rf-field select,
.rf-field textarea {
    width: 100%;
    border: 1.5px solid #e0d5cf;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    color: #2C1810;
    background: #FFFFFF;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rf-field input:focus,
.rf-field select:focus,
.rf-field textarea:focus {
    border-color: #D4511E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 81, 30, 0.1);
}

.rf-field input.rf-error,
.rf-field select.rf-error,
.rf-field textarea.rf-error {
    border-color: #C62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.rf-field-error {
    display: block;
    color: #C62828;
    font-size: 13px;
    margin-top: 4px;
    min-height: 18px;
}

.rf-field-hint {
    display: block;
    color: #8B6550;
    font-size: 12px;
    margin-top: 4px;
}

.rf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rf-readonly {
    background: #f5f0ed !important;
    cursor: not-allowed;
}

/* --- Password Strength --- */
.rf-password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 6px;
    background: #e0d5cf;
    overflow: hidden;
}

.rf-password-strength .rf-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.rf-strength-weak   { width: 33%; background: #C62828; }
.rf-strength-medium { width: 66%; background: #F5A623; }
.rf-strength-strong { width: 100%; background: #2D7A3A; }

/* --- Radio & Checkbox Cards --- */
.rf-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rf-radio-inline {
    gap: 20px;
}

.rf-radio-inline label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.rf-radio-card {
    flex: 1;
    min-width: 180px;
    background: #FFFFFF;
    border: 2px solid #e0d5cf;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-radio-card:hover {
    border-color: #D4511E;
}

.rf-radio-card input:checked + .rf-radio-label {
    color: #D4511E;
    font-weight: 600;
}

.rf-radio-card:has(input:checked) {
    border-color: #D4511E;
    background: #FFF0E5;
}

.rf-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.rf-checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1.5px solid #e0d5cf;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 400;
    font-size: 14px;
}

.rf-checkbox-card:hover {
    border-color: #D4511E;
}

.rf-checkbox-card:has(input:checked) {
    border-color: #D4511E;
    background: #FFF0E5;
}

.rf-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 400;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.rf-checkbox-field input[type="checkbox"] {
    margin-top: 4px;
    accent-color: #D4511E;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.rf-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    max-width: 700px;
    gap: 0;
}

.rf-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.rf-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: #e0d5cf;
    color: #8B6550;
    transition: all 0.3s;
}

.rf-progress-step.active .rf-step-circle {
    background: #D4511E;
    color: #FFFFFF;
}

.rf-progress-step.completed .rf-step-circle {
    background: #2D7A3A;
    color: #FFFFFF;
}

.rf-step-label {
    font-size: 11px;
    color: #8B6550;
    text-align: center;
    max-width: 80px;
}

.rf-progress-step.active .rf-step-label {
    color: #D4511E;
    font-weight: 600;
}

.rf-progress-step.completed .rf-step-label {
    color: #2D7A3A;
}

.rf-progress-line {
    flex: 1;
    height: 3px;
    background: #e0d5cf;
    min-width: 20px;
    margin: 0 4px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.rf-progress-line.active {
    background: #2D7A3A;
}

/* ============================================
   FILE UPLOAD
   ============================================ */

.rf-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rf-upload-area {
    border: 2px dashed #e0d5cf;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rf-upload-area:hover {
    border-color: #D4511E;
    background: #FFF0E5;
}

.rf-upload-area.rf-upload-success {
    border-color: #2D7A3A;
    border-style: solid;
}

.rf-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #8B6550;
    font-size: 13px;
}

.rf-upload-icon {
    font-size: 28px;
}

.rf-upload-placeholder small {
    font-size: 11px;
    color: #b09a8d;
}

.rf-upload-area .rf-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.rf-upload-preview {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
}

.rf-upload-small {
    min-height: 100px;
    padding: 16px;
}

/* Multi-photo upload */
.rf-multi-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rf-multi-upload .rf-upload-add {
    width: 120px;
    height: 120px;
    min-height: auto;
    padding: 12px;
}

.rf-dish-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.rf-dish-previews img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #FFF0E5;
}

/* Each dish thumb is a wrapper so we can flip pending → ok / failed
   states without re-rendering the <img>. */
.rf-dish-thumb {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.rf-dish-thumb img {
    display: block;
}
.rf-dish-thumb.rf-dish-pending img {
    opacity: 0.55;
    filter: grayscale(0.4);
    border-color: #FFD9B8;
}
.rf-dish-thumb.rf-dish-pending::after {
    content: "…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    pointer-events: none;
}
.rf-dish-thumb.rf-dish-ok img {
    border-color: #C9A14B;
}
.rf-dish-thumb.rf-dish-ok::after {
    content: "✓";
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2E7D32;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Dish-photos progress counter */
.rf-dish-counter {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12.5px;
    margin-top: 8px;
}
.rf-dish-counter.rf-warn {
    background: #FFF4E5;
    color: #B25E10;
    border: 1px solid #FFD9B8;
}
.rf-dish-counter.rf-ok {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #BFE3C2;
}

/* ============================================
   TERMS BOX
   ============================================ */

.rf-terms-box {
    max-height: 400px;
    overflow-y: auto;
    border: 1.5px solid #e0d5cf;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #5C3D2E;
    background: #FAFAF8;
}

.rf-terms-box h3 {
    color: #D4511E;
    margin-top: 0;
}

.rf-terms-box h4 {
    color: #2C1810;
    margin: 20px 0 8px;
}

.rf-terms-box ul {
    padding-right: 20px;
}

.rf-terms-box::-webkit-scrollbar {
    width: 6px;
}

.rf-terms-box::-webkit-scrollbar-thumb {
    background: #D4511E;
    border-radius: 3px;
}

.rf-terms-checkboxes {
    margin: 20px 0;
}

.rf-signature-box {
    background: #FFF0E5;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.rf-signature-box h3 {
    margin: 0 0 12px;
    color: #2C1810;
}

/* ============================================
   BUTTONS
   ============================================ */

.rf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
    gap: 8px;
}

.rf-btn-primary {
    background: #D4511E;
    color: #FFFFFF;
}

.rf-btn-primary:hover {
    background: #E8722D;
}

.rf-btn-outline {
    background: transparent;
    color: #D4511E;
    border-color: #D4511E;
}

.rf-btn-outline:hover {
    background: #FFF0E5;
}

.rf-btn-full {
    width: 100%;
}

.rf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rf-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
}

/* ============================================
   ALERTS
   ============================================ */

.rf-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.rf-alert-success {
    background: #E8F5E9;
    color: #2D7A3A;
    border: 1px solid #A5D6A7;
}

.rf-alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

/* ============================================
   INFO BOX
   ============================================ */

.rf-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #E3F2FD;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #1565C0;
    font-size: 14px;
}

.rf-info-icon {
    font-size: 20px;
}

/* ============================================
   SEPARATOR
   ============================================ */

.rf-separator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: #8B6550;
    font-size: 14px;
}

.rf-separator::before,
.rf-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0d5cf;
}

/* ============================================
   STATUS PAGE
   ============================================ */

.rf-status-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.06);
}

.rf-status-header {
    text-align: center;
    margin-bottom: 24px;
}

.rf-status-header h1 {
    margin: 12px 0 8px;
}

.rf-status-info {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.rf-status-info table {
    width: 100%;
}

.rf-status-info th {
    text-align: right;
    padding: 6px 12px 6px 0;
    color: #8B6550;
    font-weight: 500;
    width: 40%;
}

.rf-status-info td {
    padding: 6px 0;
    font-weight: 600;
}

.rf-status-empty {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    border-radius: 16px;
}

.rf-status-action {
    margin-top: 24px;
}

/* --- Status Progress Track --- */
.rf-progress-track {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px 0;
}

.rf-progress-track-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.rf-track-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0d5cf;
    color: #8B6550;
    font-weight: 600;
}

.rf-progress-track-step.completed .rf-track-dot {
    background: #2D7A3A;
    color: #FFFFFF;
}

.rf-progress-track-step.active .rf-track-dot {
    background: #F5A623;
    color: #FFFFFF;
}

.rf-progress-track-line {
    width: 60px;
    height: 3px;
    background: #e0d5cf;
    margin: 0 8px 20px;
}

.rf-progress-track-line.active {
    background: #2D7A3A;
}

/* Pulse animation */
.rf-pulse {
    animation: rfPulse 1.5s infinite;
}

@keyframes rfPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(245, 166, 35, 0); }
}

/* --- Status History --- */
.rf-status-history-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e0d5cf;
}

.rf-status-history-section h3 {
    color: #2C1810;
    margin-bottom: 12px;
}

.rf-history-item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f0ed;
    font-size: 13px;
}

.rf-history-date {
    color: #8B6550;
    margin-left: 8px;
}

/* ============================================
   FORM FOOTER
   ============================================ */

.rf-form-footer {
    text-align: center;
    margin-top: 24px;
    color: #8B6550;
    font-size: 14px;
}

.rf-form-footer a {
    color: #D4511E;
    font-weight: 600;
}

/* ============================================
   CONDITIONAL FIELDS
   ============================================ */

.rf-conditional {
    background: #FFF0E5;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
}

.rf-subtitle {
    color: #D4511E;
    font-size: 16px;
    margin: 0 0 12px;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.rf-social-login {
    margin-bottom: 8px;
}

/* ============================================
   TAG BADGES (admin detail)
   ============================================ */

.rf-tag {
    display: inline-block;
    background: #FFF0E5;
    color: #D4511E;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .rf-choice-cards {
        grid-template-columns: 1fr;
    }

    .rf-field-row {
        grid-template-columns: 1fr;
    }

    .rf-upload-grid {
        grid-template-columns: 1fr;
    }

    .rf-form {
        padding: 20px;
    }

    .rf-step-actions {
        flex-direction: column-reverse;
    }

    .rf-step-actions .rf-btn {
        width: 100%;
    }

    .rf-progress-bar {
        overflow-x: auto;
        padding: 0 10px;
    }

    .rf-step-label {
        font-size: 10px;
        max-width: 60px;
    }

    .rf-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .rf-status-card {
        padding: 24px 16px;
    }

    .rf-signature-box .rf-field-row {
        grid-template-columns: 1fr;
    }
}
