/* =========================================================
   E-com Asistan | Kayıt Sayfası
   Marka: SUSOFTECH (birincil mavi #1F6FEB, Manrope + Poppins)
   ========================================================= */

:root {
    --c-pr: #1F6FEB;
    --c-pr-dark: #1859c4;
    --c-pr-deep: #0f2a5c;
    --c-pr-soft: #eaf1fd;
    --ink: #1f2937;
    --ink-2: #6b7280;
    --ink-3: #9ca3af;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --line: #e5e7eb;
    --line-strong: #d1d5db;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --ok: #16a34a;
    --ring: rgba(31, 111, 235, 0.16);
    --radius: 12px;
    --radius-lg: 16px;
    --font-body: "Manrope", system-ui, -apple-system, sans-serif;
    --font-display: "Poppins", var(--font-body);
    --shadow-card: 0 1px 2px rgba(15, 42, 92, 0.05), 0 8px 24px rgba(15, 42, 92, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* ============ GENEL YERLEŞİM ============ */

.shell {
    display: grid;
    grid-template-columns: minmax(380px, 44%) 1fr;
    min-height: 100dvh;
}

/* ============ SOL MARKA PANELİ ============ */

.brand-panel {
    position: relative;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(36, 199, 192, 0.14), transparent 60%),
        radial-gradient(700px 600px at -20% 110%, rgba(31, 111, 235, 0.35), transparent 55%),
        linear-gradient(158deg, #0f2a5c 0%, #143a80 48%, #1F6FEB 130%);
    color: #fff;
    overflow: hidden;
}

/* İnce nokta dokusu */
.brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.35;
    pointer-events: none;
}

.brand-panel__inner {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: 480px;
    margin-inline: auto;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: fit-content;
}

/* Koyu zeminde logo beyaza çevrilir (wordmark koyu renklidir) */
.brand-logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.brand-hero { margin-top: 8px; }

.brand-hero h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    max-width: 22ch;
}

.brand-hero p {
    margin-top: 12px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.78);
    max-width: 38ch;
}

.brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.brand-features .ph-fill {
    font-size: 1.25rem;
    color: #7db2ff;
    flex-shrink: 0;
    margin-top: 1px;
}

.brand-marketplaces {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 24px;
}

.brand-marketplaces__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 16px;
}

.brand-marketplaces__logos {
    display: flex;
    align-items: center;
    gap: 14px 24px;
    flex-wrap: wrap;
}

.brand-marketplaces__logos img {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.brand-stats {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.brand-stats div {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
}

.brand-stats dt {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.brand-stats dd {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
}

/* ============ SAĞ FORM PANELİ ============ */

.form-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.mobile-topbar { display: none; }

.form-panel__inner {
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
    padding: 32px 48px 40px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-topline {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--ink-2);
}

.login-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--c-pr);
    font-weight: 700;
    text-decoration: none;
}

.login-link:hover { text-decoration: underline; }

.form-head { margin-top: 28px; }

.form-head h1 {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 1.3rem + 0.8vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.form-head p {
    margin-top: 6px;
    color: var(--ink-2);
    font-size: 0.98rem;
}

/* ---- Adım göstergesi ---- */

.stepper {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 28px;
}

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

.stepper__dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--line-strong);
    color: var(--ink-3);
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--surface);
    transition: all 0.25s ease;
}

.stepper__dot .ph { display: none; font-size: 1rem; }

.stepper__text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-3);
    transition: color 0.25s ease;
}

.stepper__item.is-active .stepper__dot {
    border-color: var(--c-pr);
    background: var(--c-pr);
    color: #fff;
    box-shadow: 0 0 0 4px var(--ring);
}

.stepper__item.is-active .stepper__text { color: var(--ink); }

.stepper__item.is-done .stepper__dot {
    border-color: var(--c-pr);
    background: var(--c-pr-soft);
    color: var(--c-pr);
}

.stepper__item.is-done { cursor: pointer; }
.stepper__item.is-done .stepper__num { display: none; }
.stepper__item.is-done .ph { display: block; }
.stepper__item.is-done .stepper__text { color: var(--ink-2); }

.stepper__line {
    flex: 1;
    height: 2px;
    background: var(--line);
    border-radius: 2px;
    min-width: 24px;
}

/* ---- Form kartı ---- */

#registerForm {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

/* ---- Adımlar ---- */

.step { display: none; }

.step.is-active {
    display: block;
    animation: stepIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes stepIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---- Alanlar ---- */

.grid--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.field { margin-bottom: 18px; }

.field label,
.field__legend {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 7px;
    color: var(--ink);
}

.field .optional {
    font-style: normal;
    font-weight: 500;
    color: var(--ink-2);
    font-size: 0.8rem;
}

.control {
    position: relative;
    display: flex;
    align-items: center;
}

.control > .ph {
    position: absolute;
    left: 14px;
    font-size: 1.1rem;
    color: var(--ink-3);
    pointer-events: none;
    transition: color 0.2s ease;
}

.control input,
.control select,
.control textarea {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 12px 14px 12px 42px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.control--area textarea {
    padding: 12px 14px;
    resize: vertical;
    min-height: 78px;
}

.control input::placeholder,
.control textarea::placeholder { color: var(--ink-2); opacity: 0.85; }

.control input:focus,
.control select:focus,
.control textarea:focus {
    border-color: var(--c-pr);
    box-shadow: 0 0 0 4px var(--ring);
}

.control:focus-within > .ph { color: var(--c-pr); }

/* Hata durumu */
.field.has-error .control input,
.field.has-error .control select,
.field.has-error .control textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.field.has-error .control > .ph { color: var(--danger); }

.error-text {
    display: none;
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--danger);
}

.field.has-error .error-text { display: block; }

.hint-text {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--ink-2);
}

/* Select oku */
.control--select select { padding-right: 40px; cursor: pointer; }

.control__caret {
    position: absolute;
    right: 14px;
    left: auto !important;
    font-size: 1rem !important;
}

/* Şifre göster/gizle */
.pw-toggle {
    position: absolute;
    right: 6px;
    border: 0;
    background: transparent;
    padding: 8px;
    cursor: pointer;
    color: var(--ink-3);
    display: grid;
    place-items: center;
    border-radius: 8px;
}

.pw-toggle:hover { color: var(--ink); }
.pw-toggle .ph { font-size: 1.15rem; }

.control input[type="password"],
.control input#password { padding-right: 44px; }

/* Şifre güç göstergesi */
.pw-meter {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.pw-meter span {
    height: 4px;
    flex: 1;
    border-radius: 4px;
    background: var(--line);
    transition: background 0.3s ease;
}

.pw-meter[data-level="1"] span:nth-child(1) { background: var(--danger); }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-level="3"] span { background: var(--ok); }

/* ---- Fatura tipi seçimi ---- */

.type-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.type-card { cursor: pointer; }

.type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card__box {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.type-card__box .ph {
    grid-row: span 2;
    font-size: 1.5rem;
    color: var(--ink-3);
    transition: color 0.2s ease;
}

.type-card__title {
    font-weight: 700;
    font-size: 0.92rem;
}

.type-card__desc {
    font-size: 0.78rem;
    color: var(--ink-2);
}

.type-card input:checked + .type-card__box {
    border-color: var(--c-pr);
    background: var(--c-pr-soft);
    box-shadow: 0 0 0 1px var(--c-pr) inset;
}

.type-card input:checked + .type-card__box .ph,
.type-card input:checked + .type-card__box .type-card__title { color: var(--c-pr); }

.type-card input:focus-visible + .type-card__box {
    box-shadow: 0 0 0 4px var(--ring);
}


.package-hint {
    margin: -2px 0 10px;
    font-size: 0.78rem;
    color: var(--ink-2);
}

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

.package-card {
    position: relative;
    cursor: pointer;
}

.package-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.package-card__box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 16px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.2s ease;
}

.package-card__box:hover { border-color: var(--c-pr); }

.package-card__box img {
    height: 20px;
    width: auto;
    max-width: 100%;
}

.package-card__check {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 1.05rem;
    color: var(--c-pr);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.18s ease;
}

.package-card input:checked + .package-card__box {
    border-color: var(--c-pr);
    background: var(--c-pr-soft);
    box-shadow: 0 0 0 1px var(--c-pr) inset;
}

.package-card input:checked + .package-card__box .package-card__check {
    opacity: 1;
    transform: scale(1);
}

.package-card input:focus-visible + .package-card__box {
    box-shadow: 0 0 0 4px var(--ring);
}

.field.has-error .package-card__box { border-color: var(--danger); }

.invoice-group { animation: stepIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.invoice-group.is-hidden { display: none; }

.copy-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-pr);
    cursor: pointer;
    margin-bottom: 14px;
    user-select: none;
}

.copy-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--c-pr);
    cursor: pointer;
}

/* ---- Sözleşme onayı ---- */

.agree-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--ink-2);
    cursor: pointer;
}

.agree-check input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--c-pr);
    cursor: pointer;
    flex-shrink: 0;
}

.agree-check a {
    color: var(--c-pr);
    font-weight: 600;
    text-decoration: none;
}

.agree-check a:hover { text-decoration: underline; }

/* ---- Butonlar ---- */

.step-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.step-actions--split { justify-content: space-between; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius);
    padding: 13px 26px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn .ph { font-size: 1.1rem; }

.btn--primary {
    background: var(--c-pr);
    color: #fff;
    box-shadow: 0 6px 16px rgba(31, 111, 235, 0.28);
}

.btn--primary:hover { background: var(--c-pr-dark); }

.btn--primary:active { transform: translateY(1px) scale(0.99); }

.btn--ghost {
    background: transparent;
    color: var(--ink-2);
    border-color: var(--line-strong);
}

.btn--ghost:hover {
    color: var(--ink);
    border-color: var(--ink-3);
    background: var(--surface);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Gönderim animasyonu */
.btn--loading .ph { display: none; }

.btn--loading::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.form-foot {
    margin-top: 24px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--ink-3);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.is-open { display: flex; }

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 42, 92, 0.55);
    backdrop-filter: blur(3px);
    animation: modalFade 0.25s ease;
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px 28px 28px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(15, 42, 92, 0.30);
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

@keyframes modalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalPop {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 14px;
}

.modal__icon i { font-size: 2.2rem; display: none; }

.modal--success .modal__icon { background: #e8f7ee; }
.modal--success .modal__icon--success { display: block; color: var(--ok); }

.modal--error .modal__icon { background: var(--danger-soft); }
.modal--error .modal__icon--error { display: block; color: var(--danger); }

.modal__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 8px;
	color: var(--ink-2);
}

.modal__message {
    font-size: 1.2rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.modal__message a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--c-pr);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

.modal__message a:hover { background: var(--c-pr-dark); }

.modal__ok {
    display: none;
    margin: 20px auto 0;
    min-width: 140px;
    justify-content: center;
}

.modal--error .modal__ok { display: inline-flex; }

body.modal-open { overflow: hidden; }

/* Hata sallama */
.shake { animation: shake 0.4s ease; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ============ DUYARLI TASARIM ============ */

@media (max-width: 1023px) {
    .shell { grid-template-columns: 1fr; }

    .brand-panel { display: none; }

    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        background: linear-gradient(135deg, #0f2a5c 0%, #1F6FEB 140%);
        color: #fff;
    }

    .mobile-topbar .login-link { color: #fff; }

    .mobile-topbar .brand-logo img { height: 28px; }

    .form-topline { display: none; }

    .form-panel__inner { padding: 24px 20px 32px; }

    .form-head { margin-top: 4px; }
}

@media (max-width: 640px) {
    .grid--2 { grid-template-columns: 1fr; gap: 0; }

    #registerForm { padding: 20px 16px; }

    .type-switch { grid-template-columns: 1fr; }

    .stepper__text { font-size: 0.8rem; }

    .step-actions--split { gap: 12px; }

    .step-actions .btn { flex: 1; justify-content: center; }

    .step-actions:not(.step-actions--split) .btn { width: 100%; justify-content: center; }
}

/* ============ HAREKET AZALTMA ============ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
