/* BestBroker.id - Login, Register, Dashboard, dan Profil */

:root {
    --bb-account-bg: #07101f;
    --bb-account-panel: #0f1b2e;
    --bb-account-panel-soft: #132239;
    --bb-account-border: rgba(148, 163, 184, 0.18);
    --bb-account-text: #f8fafc;
    --bb-account-muted: #9fb0c6;
    --bb-account-blue: #2563eb;
    --bb-account-cyan: #38bdf8;
    --bb-account-green: #22c55e;
    --bb-account-red: #ef4444;
    --bb-account-yellow: #f59e0b;
}

.bb-auth-page,
.bb-auth-page * {
    box-sizing: border-box;
}

.bb-auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--bb-account-text);
    background:
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.22), transparent 33%),
        radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.13), transparent 31%),
        var(--bb-account-bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bb-auth-shell {
    width: min(1080px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(390px, 1.12fr);
    align-items: center;
    gap: 52px;
}

.bb-auth-story {
    padding: 22px 6px;
}

.bb-auth-logo {
    display: inline-flex;
    align-items: center;
    max-width: 260px;
    padding: 11px 16px;
    margin-bottom: 38px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.bb-auth-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.bb-auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bb-auth-kicker::before {
    width: 24px;
    height: 2px;
    content: "";
    background: var(--bb-account-cyan);
    border-radius: 99px;
}

.bb-auth-story h1 {
    max-width: 560px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 4.4vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.bb-auth-story > p {
    max-width: 560px;
    margin: 0;
    color: #b5c4d8;
    font-size: 16px;
    line-height: 1.75;
}

.bb-auth-points {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.bb-auth-point {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dbeafe;
    font-size: 14px;
    font-weight: 700;
}

.bb-auth-point span {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.26);
    border-radius: 50%;
}

.bb-auth-card {
    padding: 34px;
    background: rgba(15, 27, 46, 0.94);
    border: 1px solid var(--bb-account-border);
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
}

.bb-auth-card-head {
    margin-bottom: 25px;
}

.bb-auth-card-head h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.bb-auth-card-head p {
    margin: 0;
    color: var(--bb-account-muted);
    line-height: 1.6;
}

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

.bb-field {
    display: grid;
    gap: 8px;
}

.bb-field-full {
    grid-column: 1 / -1;
}

.bb-field label {
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.bb-field input,
.bb-field textarea,
.bb-field select {
    width: 100%;
    min-height: 49px;
    padding: 0 14px;
    color: #f8fafc;
    background: #0a1526;
    border: 1px solid #2a3a52;
    border-radius: 12px;
    outline: none;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bb-field textarea {
    min-height: 120px;
    padding-top: 13px;
    resize: vertical;
}

.bb-field input:focus,
.bb-field textarea:focus,
.bb-field select:focus {
    border-color: var(--bb-account-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.bb-field input::placeholder,
.bb-field textarea::placeholder {
    color: #64748b;
}

.bb-field-hint {
    color: #71839a;
    font-size: 12px;
    line-height: 1.45;
}

.bb-field-error {
    color: #fca5a5;
    font-size: 12px;
    font-weight: 700;
}

.bb-password-wrap {
    position: relative;
}

.bb-password-wrap input {
    padding-right: 72px;
}

.bb-password-toggle {
    position: absolute;
    top: 50%;
    right: 11px;
    padding: 5px 6px;
    color: #93c5fd;
    background: transparent;
    border: 0;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.bb-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #aebdd0;
    font-size: 13px;
    line-height: 1.6;
}

.bb-check-row input {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--bb-account-blue);
}

.bb-check-row a,
.bb-auth-switch a {
    color: #7dd3fc;
    font-weight: 800;
}

.bb-auth-submit,
.bb-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    padding: 12px 20px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1747b7);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.bb-auth-submit {
    width: 100%;
    margin-top: 4px;
}

.bb-auth-submit:hover,
.bb-account-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.bb-auth-switch {
    margin: 20px 0 0;
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

.bb-auth-back {
    display: block;
    margin-top: 18px;
    color: #7c8fa8;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.bb-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
}

.bb-alert-error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.11);
    border-color: rgba(239, 68, 68, 0.28);
}

.bb-alert-success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.11);
    border-color: rgba(34, 197, 94, 0.28);
}

.bb-alert-warning {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.11);
    border-color: rgba(245, 158, 11, 0.28);
}

.bb-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Dashboard dan profil publik */

.bb-account-page {
    min-height: 520px;
    padding: 48px 0 76px;
    color: var(--bb-account-text);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34%),
        #0b1020;
}

.bb-account-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.bb-account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
    padding: 30px;
    background: linear-gradient(135deg, #101d33, #10264b);
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.bb-account-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.bb-account-avatar {
    display: inline-flex;
    flex: 0 0 66px;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    color: #dbeafe;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    border: 3px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    font-size: 25px;
    font-weight: 900;
}

.bb-account-hero h1 {
    margin: 0 0 7px;
    color: #fff;
    font-size: clamp(25px, 3vw, 35px);
    letter-spacing: -0.035em;
}

.bb-account-hero p {
    margin: 0;
    color: #9fb0c6;
    line-height: 1.6;
}

.bb-role-badge {
    display: inline-flex;
    padding: 6px 10px;
    margin-top: 9px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bb-account-button-secondary {
    color: #bfdbfe;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(96, 165, 250, 0.32);
    box-shadow: none;
}

.bb-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.bb-account-card {
    padding: 23px;
    background: #101a2c;
    border: 1px solid var(--bb-account-border);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.bb-account-card-wide {
    grid-column: span 2;
}

.bb-account-card h2,
.bb-account-card h3 {
    margin: 0 0 8px;
    color: #fff;
    letter-spacing: -0.025em;
}

.bb-account-card h2 {
    font-size: 21px;
}

.bb-account-card h3 {
    font-size: 16px;
}

.bb-account-card > p {
    margin: 0;
    color: var(--bb-account-muted);
    font-size: 14px;
    line-height: 1.65;
}

.bb-account-stat {
    display: block;
    margin: 13px 0 5px;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}

.bb-progress {
    height: 8px;
    margin: 17px 0 10px;
    overflow: hidden;
    background: #26344a;
    border-radius: 99px;
}

.bb-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    border-radius: inherit;
}

.bb-account-list {
    display: grid;
    gap: 0;
    margin-top: 17px;
}

.bb-account-list-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

.bb-account-list-row:last-child {
    border-bottom: 0;
}

.bb-account-list-row span {
    color: #8799b0;
}

.bb-account-list-row strong {
    color: #e5edf8;
    text-align: right;
}

.bb-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.bb-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 20px;
}

.bb-profile-layout .bb-form-grid {
    margin-top: 22px;
}

.bb-account-card .bb-field input,
.bb-account-card .bb-field textarea,
.bb-account-card .bb-field select {
    background: #0b1424;
}

@media (max-width: 880px) {
    .bb-auth-shell {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 0 42px;
    }

    .bb-auth-story {
        padding-bottom: 0;
    }

    .bb-auth-story h1 {
        font-size: 36px;
    }

    .bb-auth-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bb-auth-point {
        align-items: flex-start;
        font-size: 12px;
    }

    .bb-account-grid,
    .bb-profile-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bb-profile-layout > * {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .bb-auth-shell,
    .bb-account-container {
        width: min(100% - 22px, 1120px);
    }

    .bb-auth-logo {
        max-width: 210px;
        margin-bottom: 25px;
    }

    .bb-auth-story h1 {
        font-size: 31px;
    }

    .bb-auth-story > p {
        font-size: 14px;
    }

    .bb-auth-points {
        display: none;
    }

    .bb-auth-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .bb-form-grid,
    .bb-account-grid {
        grid-template-columns: 1fr;
    }

    .bb-account-card-wide {
        grid-column: auto;
    }

    .bb-account-page {
        padding: 30px 0 54px;
    }

    .bb-account-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .bb-account-identity {
        align-items: flex-start;
    }

    .bb-account-avatar {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
        border-radius: 16px;
        font-size: 20px;
    }

    .bb-account-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bb-auth-submit,
    .bb-account-button,
    .bb-field input,
    .bb-field textarea,
    .bb-field select {
        transition: none;
    }
}
