/* Halaman pendaftaran publik (vendor & customer). Flat, teal Tradecorp. */

:root {
    --teal: #0f766e;
    --teal-dark: #115e59;
    --teal-soft: #e6f4f1;
}

.reg-body {
    min-height: 100vh;
    margin: 0;
    background: #eef2f1;
    color: #1f2933;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    font-size: 0.95rem;
}

.reg-shell {
    width: 100%;
    max-width: 1040px;
    display: flex;
    background: #fff;
    border: 1px solid #dfe5e3;
    border-radius: 18px;
    overflow: hidden;
    min-height: 600px;
}

/* ---------- panel kiri ---------- */
.reg-brand {
    flex: 0 0 320px;
    background: var(--teal);
    color: #fff;
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: space-between;
}

.reg-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.reg-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* Logo upload dari Pengaturan: kotak putih supaya logo berwarna tetap terbaca. */
.reg-logo.has-img {
    width: fit-content;
    padding: 6px 10px;
    background: #fff;
}

.reg-logo.has-img {
    height: auto;
    padding: 0;
    background: none;
}

.reg-logo.has-img img {
    display: block;
    max-width: 230px;
    max-height: 60px;
    object-fit: contain;
}

.reg-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.reg-logo-name {
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reg-lang {
    flex-shrink: 0;
}

.reg-logo.has-img.is-square img {
    width: 60px;
    height: 60px;
}

.reg-lang {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    overflow: hidden;
}

.reg-lang a {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 9px;
    opacity: 0.75;
}

.reg-lang a.active {
    background: rgba(255, 255, 255, 0.18);
    opacity: 1;
}

.reg-brand-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
}

.reg-brand-company {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 2px;
}

.reg-brand-text {
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.9;
    margin: 16px 0 0;
}

.reg-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reg-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.reg-steps li.active,
.reg-steps li.done {
    opacity: 1;
}

.reg-step-dot {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
}

.reg-steps li.active .reg-step-dot {
    background: #fff;
    color: var(--teal);
    border-color: #fff;
}

.reg-steps li.done .reg-step-dot {
    background: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    font-size: 0;
}

.reg-steps li.done .reg-step-dot::before {
    content: "\2713";
    font-size: 0.85rem;
}

.reg-brand-foot {
    font-size: 0.75rem;
    opacity: 0.75;
    line-height: 1.5;
}

/* ---------- panel kanan ---------- */
.reg-main {
    flex: 1;
    min-width: 0;
    padding: 28px 32px;
}

.reg-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.reg-sub {
    color: #5f6b72;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.reg-progress {
    height: 4px;
    background: #e3e9e7;
    border-radius: 2px;
    margin-bottom: 6px;
}

.reg-progress-bar {
    height: 100%;
    width: 33%;
    background: var(--teal);
    border-radius: 2px;
    transition: width 0.25s ease;
}

.reg-step-label {
    font-size: 0.78rem;
    color: #5f6b72;
    margin-bottom: 18px;
}

.reg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.reg-field-wide,
.reg-section {
    grid-column: 1 / -1;
}

.reg-section {
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid #e3e9e7;
}

.reg-field .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.reg-field .form-control {
    font-size: 0.92rem;
}

.reg-field .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.15);
}

.reg-req {
    color: #c0392b;
}

.reg-opt {
    color: #8a959b;
    font-weight: 400;
    font-size: 0.78rem;
}

.reg-doc .reg-opt {
    display: block;
}

.reg-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- kartu dokumen ---------- */
.reg-docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.reg-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 16px 12px 14px;
    border: 1.5px dashed #c7d1ce;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
    min-height: 140px;
}

.reg-doc input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.reg-doc:hover,
.reg-doc.drag {
    border-color: var(--teal);
    background: var(--teal-soft);
}

.reg-doc.has-file {
    border-style: solid;
    border-color: #1d9e75;
    background: var(--teal-soft);
}

.reg-doc.is-invalid {
    border-color: #c0392b;
    background: #fdf1f0;
}

.reg-doc-icon {
    font-size: 1.6rem;
    color: var(--teal);
}

.reg-doc-ok {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #1d9e75;
    font-size: 1.05rem;
    display: none;
}

.reg-doc.has-file .reg-doc-ok {
    display: block;
}

.reg-doc-label {
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.3;
}

.reg-doc-file {
    font-size: 0.75rem;
    color: #5f6b72;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reg-doc.has-file .reg-doc-file {
    color: #0b5d4a;
    font-weight: 500;
}

.reg-doc-error {
    font-size: 0.75rem;
    color: #c0392b;
}

.reg-count {
    color: var(--teal-dark);
    font-weight: 600;
}

.reg-actions {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #e3e9e7;
}

.btn-teal {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.btn-teal:hover,
.btn-teal:focus {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: #fff;
}

/* ---------- pilihan jenis & selesai ---------- */
.reg-choices {
    display: grid;
    gap: 12px;
}

.reg-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #dfe5e3;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}

.reg-choice > .bi:first-child {
    font-size: 1.6rem;
    color: var(--teal);
}

.reg-choice:hover {
    border-color: var(--teal);
    background: var(--teal-soft);
}

.reg-done {
    text-align: center;
    max-width: 460px;
    margin: 48px auto 0;
}

.reg-done-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.reg-done-icon-muted {
    background: #e3e9e7;
    color: #5f6b72;
}

.reg-ref {
    border: 1px dashed #c7d1ce;
    border-radius: 12px;
    padding: 14px;
}

.reg-ref-no {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--teal-dark);
    margin: 2px 0;
}

/* ---------- HP / tablet: panel kiri jadi header ringkas ---------- */
@media (max-width: 860px) {
    .reg-body {
        padding: 0;
    }

    .reg-shell {
        flex-direction: column;
        border-radius: 0;
        border: 0;
        min-height: 100vh;
    }

    .reg-brand {
        flex: 0 0 auto;
        padding: 18px 16px;
        gap: 12px;
    }

    .reg-brand-top {
        margin-bottom: 12px;
    }

    /* HP: logo + nama tetap muat di samping tombol ID/EN. */
    .reg-logo-row .reg-logo.has-img img {
        max-width: 140px;
        max-height: 44px;
    }

    .reg-logo-row .reg-logo.has-img.is-square img {
        width: 44px;
        height: 44px;
    }

    .reg-logo-name {
        font-size: 1rem;
    }

    .reg-brand-title {
        font-size: 1.2rem;
    }

    .reg-brand-text,
    .reg-brand-foot {
        display: none;
    }

    .reg-steps {
        display: flex;
        gap: 6px;
    }

    .reg-steps li {
        flex: 1;
        flex-direction: column;
        gap: 4px;
        font-size: 0.7rem;
        text-align: center;
        padding: 0;
    }

    .reg-main {
        padding: 18px 16px 24px;
    }

    .reg-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .reg-docs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .reg-doc {
        min-height: 128px;
        padding: 12px 8px;
    }
}
