/* ============================================================
   Berberim Register – Modern Registration Form Styles
   ============================================================ */

/* ---------- Reset & Wrapper ---------- */
.breg-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    min-height: 60vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.breg-wrap *,
.breg-wrap *::before,
.breg-wrap *::after {
    box-sizing: border-box;
}

/* ---------- Card ---------- */
.breg-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 40px 36px 32px;
    animation: breg-fadeIn 0.4s ease;
}

@keyframes breg-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Logged-in state ---------- */
.breg-logged-in {
    text-align: center;
}

.breg-logged-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.breg-logged-in h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1a1a2e;
}

.breg-logged-in p {
    color: #555;
    margin: 0 0 24px;
}

/* ---------- Header ---------- */
.breg-header {
    text-align: center;
    margin-bottom: 28px;
}

.breg-logo {
    font-size: 44px;
    margin-bottom: 8px;
    line-height: 1;
}

.breg-header h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}

.breg-subtitle {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* ---------- Steps ---------- */
.breg-step {
    display: none;
}

.breg-step-active {
    display: block;
    animation: breg-slideIn 0.35s ease;
}

@keyframes breg-slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.breg-step-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0 0 18px;
    text-align: center;
}

/* ---------- Role Cards ---------- */
.breg-roles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.breg-role-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.breg-role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.breg-role-inner {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 14px;
    padding: 16px 20px;
    border: 2px solid #e8e8ef;
    border-radius: 14px;
    transition: all 0.25s ease;
    background: #fafafe;
}

.breg-role-card:hover .breg-role-inner {
    border-color: #c5c5e0;
    background: #f4f4fc;
}

.breg-role-selected .breg-role-inner {
    border-color: #6c5ce7;
    background: linear-gradient(135deg, #f8f7ff 0%, #eee9ff 100%);
    box-shadow: 0 2px 12px rgba(108, 92, 231, 0.15);
}

.breg-role-icon {
    grid-row: 1 / 3;
    grid-column: 1;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.breg-role-label {
    grid-row: 1;
    grid-column: 2;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.breg-role-sublabel {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6c5ce7;
    background: rgba(108,92,231,0.1);
    padding: 2px 8px;
    border-radius: 20px;
}

.breg-role-desc {
    grid-row: 2;
    grid-column: 2;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.breg-role-check {
    grid-row: 1 / 3;
    grid-column: 3;
    width: 28px;
    height: 28px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.25s ease;
    background: #fff;
}

.breg-role-selected .breg-role-check {
    border-color: #6c5ce7;
    background: #6c5ce7;
    color: #fff;
}

/* ---------- Back Button ---------- */
.breg-back-btn {
    background: none;
    border: none;
    color: #6c5ce7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.breg-back-btn:hover {
    color: #5a4bd1;
}

/* ---------- Form Fields ---------- */
.breg-form {
    margin: 0;
}

.breg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.breg-field {
    margin-bottom: 16px;
}

.breg-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.breg-req {
    color: #e74c3c;
}

.breg-field input[type="text"],
.breg-field input[type="email"],
.breg-field input[type="tel"],
.breg-field input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e8e8ef;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fafafe;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.breg-field input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
    background: #fff;
}

.breg-field input::placeholder {
    color: #bbb;
}

/* ---------- Password wrapper ---------- */
.breg-pass-wrap {
    position: relative;
}

.breg-pass-wrap input {
    padding-right: 44px;
}

.breg-toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
}

/* ---------- Password Strength ---------- */
.breg-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.breg-strength-bar {
    flex: 1;
    height: 6px;
    background: #e8e8ef;
    border-radius: 3px;
    overflow: hidden;
}

.breg-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.3s, background 0.3s;
}

.breg-strength-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

/* ---------- Buttons ---------- */
.breg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
}

.breg-btn-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(108, 92, 231, 0.3);
}

.breg-btn-primary:hover {
    background: linear-gradient(135deg, #5a4bd1 0%, #8c84f0 100%);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.breg-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.breg-btn-outline {
    background: transparent;
    color: #6c5ce7;
    border-color: #6c5ce7;
}

.breg-btn-outline:hover {
    background: rgba(108, 92, 231, 0.06);
    color: #5a4bd1;
}

.breg-btn-full {
    width: 100%;
}

/* ---------- Errors ---------- */
.breg-errors {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.breg-error-item {
    font-size: 13px;
    color: #c53030;
    padding: 3px 0;
}

/* ---------- Footer ---------- */
.breg-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #888;
}

.breg-footer a {
    color: #6c5ce7;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.breg-footer a:hover {
    color: #5a4bd1;
    text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .breg-card {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    .breg-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .breg-role-inner {
        grid-template-columns: 42px 1fr auto;
        padding: 14px 14px;
    }

    .breg-role-sublabel {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        width: fit-content;
    }
}
