/* Shared + login fallback */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: isans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111827;
}

body {
    background: #f8f8f8;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Login page legacy layout */
.container {
    max-width: 530px;
    margin: 24px auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
}

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

.gridfull {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
}

.gridfull .field {
    width: 100%;
}

.col-main {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    padding: 16px;
}

.mainlogo {
    width: 195px;
    max-width: 100%;
    height: auto;
}

.field {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
}

.field label {
    font-size: 12px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border-radius: 4px;
    padding: 11px 9px;
    font-size: 12px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    box-shadow: inset 1px 1px 5px rgba(221, 221, 221, 0.1);
}

.field textarea { resize: vertical; }

.terms .checkbox {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    width: 100%;
}

#sozlesme,
#kvkk { width: 16px; margin-top: 3px; flex-shrink: 0; }

.contract-loading {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
}

.terms a {
    color: #0ea5e9;
    text-decoration: none;
}

.terms a:hover { text-decoration: underline; }

.actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.btn-ghost {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111;
    padding: 8px 10px;
    cursor: pointer;
}

.pwd-meter {
    height: 8px;
    background: #f3f4f6;
    border-radius: 999px;
    position: relative;
    width: 100%;
    margin-top: 8px;
}

.pwd-meter .bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #ef4444;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.pwd-meter .txt {
    font-size: 12px;
    color: #6b7280;
}

.reg-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #0f172a;
    margin: 8px 0 14px;
}

.reg-alert.is-success {
    border-color: #d1fae5;
    background: #ecfdf5;
    color: #065f46;
}

.reg-alert.is-error {
    border-color: #fee2e2;
    background: #fef2f2;
    color: #7f1d1d;
}

.reg-alert.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #78350f;
}

.captcha .cap-desc {
    font-size: 11px;
    color: #ef8044;
    margin-bottom: 10px;
}

.captcha .cap-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cap-word {
    padding: 8px 10px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6vh;
}

.modal-content {
    width: min(760px, 94vw);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-footer {
    border-top: 1px solid #eef2f7;
    border-bottom: none;
}

.modal-body {
    padding: 12px 14px;
    max-height: 70vh;
    overflow: auto;
}

.btn-close {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.reg-result {
    background: linear-gradient(180deg, #f0fdf4 0, #ffffff 120px);
    border: 1px solid #dcfce7;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.12);
    text-align: center;
    margin: 10px 0;
}

.reg-result .icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 8px;
}

.reg-result .title {
    font-size: 20px;
    font-weight: 800;
    color: #065f46;
    margin: 6px 0 8px;
}

.reg-result .desc {
    font-size: 15px;
    color: #334155;
    margin: 0 auto 14px;
    max-width: 720px;
}

.reg-result .actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.reg-result .btn-primary { background: #059669; }

.error-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}

.error-modal-overlay.active { display: flex; }

.error-modal {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.error-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-modal-header.error {
    background: #fef2f2;
    border-bottom-color: #fee2e2;
}

.error-modal-header.warning {
    background: #fffbeb;
    border-bottom-color: #fde68a;
}

.error-modal-icon { font-size: 24px; line-height: 1; }

.error-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.error-modal-body {
    padding: 20px 24px;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.error-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.error-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.error-modal-btn-primary {
    background: #2563eb;
    color: #fff;
}

.field-error {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ============================================================
   Üyelik Kayıt Sayfası — yeni tasarım
   ============================================================ */
body.register-page {
    background: #eef2f6;
    min-height: 100vh;
}

.register-page .register-page-header {
    padding: 0;
    margin: 0 0 18px;
    text-align: left;
}

.register-page .register-page-logo {
    display: inline-block;
    line-height: 0;
}

.register-page .mainlogo {
    width: auto;
    height: 48px;
    max-width: min(220px, 70vw);
    margin: 0;
    padding: 0;
}

.register-page .container {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.register-page .register-card {
    background: #ffffff;
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(15, 35, 80, 0.06);
    padding: 28px 32px 32px;
}

.register-page .register-card-head {
    margin-bottom: 18px;
}

.register-page .register-card-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #6b7280;
}

.register-page #registerForm {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.register-page .reg-row-2,
.register-page .reg-row-pwd {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 2px;
}

.register-page .field {
    margin: 0 0 14px;
}

.register-page .field label,
.register-page .pwd-strength-label {
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 600;
}

.register-page .field input,
.register-page .field select,
.register-page .field textarea {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 12px 12px;
    font-size: 14px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.register-page .field input:focus,
.register-page .field select:focus,
.register-page .field textarea:focus {
    outline: none;
    border-color: #1d4ed8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.register-page .field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.register-page .field-pwd-strength {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.register-page .field-pwd-strength .pwd-meter {
    margin-top: 0;
    height: auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.register-page .field-pwd-strength .pwd-meter .txt {
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    text-align: right;
    order: -1;
}

.register-page .field-pwd-strength .pwd-meter .bar {
    position: relative;
    height: 8px;
    width: 100%;
    background: #f3f4f6;
    border-radius: 999px;
}

.register-page .gridfull {
    display: block;
}

.register-page .gridfull .field {
    width: 100%;
}

.register-page .field.terms {
    margin: 6px 0 16px;
    padding: 0;
}

.register-page .terms .checkbox {
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
}

.register-page .terms a {
    color: #0b2d6b;
    font-weight: 700;
    text-decoration: none;
}

.register-page .terms a:hover {
    text-decoration: underline;
}

.register-page .field.captcha {
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.register-page .field.captcha > label {
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
}

.register-page .captcha .cap-desc {
    font-size: 12px;
    color: #dc2626;
    margin-bottom: 12px;
    line-height: 1.45;
}

.register-page .captcha .cap-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

.register-page .cap-word {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: #ffffff;
    border: 2px solid #1d4ed8;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #1d4ed8;
    min-width: 110px;
}

.register-page .captcha .cap-row input[type="number"] {
    flex: 1;
    min-width: 120px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 10px 12px;
    font-size: 14px;
}

.register-page .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.register-page .btn-ghost:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.register-page .actions {
    margin-top: 4px;
}

.register-page .btn-primary {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    background: #15803d;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.25);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.register-page .btn-primary:hover {
    background: #166534;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(21, 128, 61, 0.32);
}

.register-page .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.register-page .modal-footer .btn-primary {
    width: auto;
    background: #0b2d6b;
    box-shadow: none;
}

.register-page .reg-alert {
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .register-page .container {
        padding: 8px 12px 32px;
    }

    .register-page .register-card {
        padding: 22px 18px 24px;
        border-radius: 12px;
    }

    .register-page .reg-row-2,
    .register-page .reg-row-pwd {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .register-page .field-pwd-strength {
        margin-bottom: 14px;
    }

    .register-page .field-pwd-strength .pwd-meter .txt {
        text-align: left;
    }

    .register-page .captcha .cap-row input[type="number"] {
        width: 100%;
        max-width: none;
    }

    .register-page .captcha .cap-row .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}

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