/* ============================================================
   Theme Index11: "Photo Split" — Image Left + Form Right
   Lime Green Scheme + Bootstrap 5 + Poppins
   ============================================================ */

:root {
    --idx11-primary: #65a30d;
    --idx11-primary-rgb: 101, 163, 13;
    --idx11-primary-light: #84cc16;
    --idx11-primary-dark: #4d7c0f;
    --idx11-accent: #a3e635;
    --idx11-accent-rgb: 163, 230, 53;
    --idx11-text: #1e293b;
    --idx11-text-muted: #64748b;
    --idx11-text-light: #94a3b8;
    --idx11-border: #e2e8f0;
    --idx11-input-bg: #f8fafc;
    --idx11-input-border: #cbd5e1;
    --idx11-card-bg: #fff;
    --idx11-radius: 1.25rem;
    --idx11-radius-sm: 0.75rem;

    /* Shared component aliases */
    --aff-primary: var(--idx11-primary);
    --aff-primary-rgb: var(--idx11-primary-rgb);
    --aff-primary-dark: var(--idx11-primary-dark);
    --aff-primary-light: var(--idx11-primary-light);
    --aff-text: var(--idx11-text);
    --aff-text-muted: var(--idx11-text-muted);
    --aff-radius: var(--idx11-radius-sm);
    --aff-input-bg: var(--idx11-input-bg);
    --aff-input-border: var(--idx11-input-border);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; overflow-x: hidden; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--idx11-text); min-height: 100vh;
    background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 40%, #f8fafc 100%);
    display: flex; flex-direction: column;
}

/* === Main Layout === */
.idx11-wrapper {
    flex: 1 0 auto; display: flex; flex-direction: column;
}
.idx11-topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; position: relative; z-index: 10;
}
.idx11-logo img { max-height: 45px; height: auto; object-fit: contain; }

/* Language */
.language-changer { position: relative; }
.language-changer > a {
    background: rgba(255,255,255,0.9); color: var(--idx11-text);
    border: 1px solid var(--idx11-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.4rem 0.9rem; border-radius: 50px;
    font-size: 0.85rem; transition: all 0.3s ease;
}
.language-changer > a:hover { background: rgba(var(--idx11-primary-rgb),0.08); border-color: var(--idx11-primary); }
.selected-language { width: 22px; margin-right: 6px; }
.country-wrap .dropdown-item img { width: 20px; margin-right: 8px; }
.dropdown-menu.country-wrap, .country-wrap.dropdown-menu {
    border: 1px solid var(--idx11-border); border-radius: var(--idx11-radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 0.5rem 0; background: #fff;
}
.country-wrap .dropdown-item { padding: 0.5rem 1rem; font-size: 0.9rem; color: var(--idx11-text); }
.country-wrap .dropdown-item:hover { background: rgba(var(--idx11-primary-rgb),0.06); }

/* Content */
.idx11-content { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 1rem 2rem 5rem; }
.idx11-content > .idx11-card { margin: auto 0; }

/* Card */
.idx11-card {
    background: var(--idx11-card-bg); border-radius: var(--idx11-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    overflow: hidden; display: flex; max-width: 900px; width: 100%;
    transition: box-shadow 0.4s ease;
}
.idx11-card:hover { box-shadow: 0 25px 70px rgba(0,0,0,0.1), 0 6px 20px rgba(0,0,0,0.05); }

/* Image Side — Pure CSS decorative design */
.idx11-image-side {
    width: 45%; position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--idx11-primary) 0%, var(--idx11-primary-dark) 50%, #064e3b 100%);
}

/* Decorative floating shapes */
.idx11-deco-shapes {
    position: absolute; inset: 0; z-index: 1; overflow: hidden;
}
.idx11-deco-circle {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.idx11-deco-c1 {
    width: 180px; height: 180px; top: -40px; right: -30px;
    animation: idx11Float 6s ease-in-out infinite;
}
.idx11-deco-c2 {
    width: 120px; height: 120px; bottom: 30%; left: -25px;
    background: rgba(255,255,255,0.06);
    animation: idx11Float 8s ease-in-out 1s infinite reverse;
}
.idx11-deco-c3 {
    width: 60px; height: 60px; top: 35%; right: 20%;
    background: rgba(var(--idx11-accent-rgb),0.15);
    animation: idx11Float 5s ease-in-out 0.5s infinite;
}
.idx11-deco-leaf {
    position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
    z-index: 2;
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    animation: idx11Float 7s ease-in-out 0.3s infinite;
}
.idx11-deco-leaf i {
    font-size: 2rem; color: rgba(255,255,255,0.7);
}
@keyframes idx11Float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Overlay text at bottom */
.idx11-image-overlay {
    position: absolute; inset: 0; z-index: 3;
    display: flex; flex-direction: column;
    justify-content: flex-end; padding: 1.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
}
.idx11-side-icon {
    width: 44px; height: 44px; border-radius: 0.75rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.75rem;
}
.idx11-side-icon i { font-size: 1.1rem; color: #fff; }
.idx11-image-overlay h3 {
    color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 0.35rem;
    line-height: 1.35; word-break: break-word;
}
.idx11-image-overlay p {
    color: rgba(255,255,255,0.85); font-size: 0.82rem; margin: 0; line-height: 1.5;
}

/* Form Side */
.idx11-form-side {
    width: 55%; display: flex; align-items: flex-start; justify-content: center;
    padding: 2.5rem 2.5rem; overflow-y: auto;
}
.idx11-form-wrapper { width: 100%; max-width: 380px; margin: auto 0; }

/* Icon */
.idx11-header-icon {
    width: 52px; height: 52px; border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--idx11-primary), var(--idx11-primary-dark));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 20px rgba(var(--idx11-primary-rgb),0.3);
    animation: idx11IconPulse 3s ease-in-out infinite;
}
.idx11-header-icon i { font-size: 1.3rem; color: #fff; }
@keyframes idx11IconPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(var(--idx11-primary-rgb),0.3); }
    50% { box-shadow: 0 6px 28px rgba(var(--idx11-primary-rgb),0.5); }
}

.idx11-title {
    font-size: 1.4rem; font-weight: 800; color: var(--idx11-text);
    text-align: center; margin-bottom: 0.25rem; letter-spacing: 0.02em;
}
.idx11-subtitle { color: var(--idx11-text-muted); font-size: 0.88rem; text-align: center; margin-bottom: 1.5rem; }

/* Inputs */
.idx11-input-group { position: relative; }
.idx11-input {
    background: var(--idx11-input-bg) !important;
    border: 1.5px solid var(--idx11-input-border) !important;
    border-radius: var(--idx11-radius-sm) !important;
    color: var(--idx11-text) !important;
    height: 52px; font-size: 0.93rem; transition: all 0.3s ease;
    padding-right: 3rem;
}
.idx11-input::placeholder { color: transparent; }
.idx11-input:focus {
    background: #fff !important;
    border-color: var(--idx11-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--idx11-primary-rgb),0.12), 0 4px 16px rgba(var(--idx11-primary-rgb),0.06) !important;
}
.idx11-input-group label { color: var(--idx11-text-muted); font-size: 0.88rem; }
.idx11-input-group .form-control:focus ~ label,
.idx11-input-group .form-control:not(:placeholder-shown) ~ label { color: var(--idx11-primary); }

.idx11-input-group .toggle-password {
    position: absolute; top: 50%; right: 12px; transform: translateY(-50%); z-index: 5;
    color: var(--idx11-text-light); background: transparent; border: none;
    padding: 0.25rem 0.5rem; cursor: pointer; transition: all 0.3s ease; border-radius: 50%;
}
.idx11-input-group .toggle-password:hover { color: var(--idx11-primary); background: rgba(var(--idx11-primary-rgb),0.08); }

/* Buttons */
.idx11-btn-primary {
    background: linear-gradient(135deg, var(--idx11-primary), var(--idx11-primary-dark));
    border: none; color: #fff;
    border-radius: 50px; font-size: 1rem; font-weight: 700;
    position: relative; overflow: hidden; transition: all 0.35s ease;
    box-shadow: 0 4px 15px rgba(var(--idx11-primary-rgb),0.3);
}
.idx11-btn-primary::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.idx11-btn-primary:hover {
    transform: translateY(-2px); color: #fff;
    box-shadow: 0 8px 25px rgba(var(--idx11-primary-rgb),0.4);
}
.idx11-btn-primary:hover::before { left: 100%; }

.idx11-btn-outline {
    background: transparent; border: 1.5px solid var(--idx11-border);
    color: var(--idx11-text-muted); border-radius: 50px;
    font-weight: 600; transition: all 0.3s ease;
}
.idx11-btn-outline:hover {
    background: rgba(var(--idx11-primary-rgb),0.04); border-color: var(--idx11-primary);
    color: var(--idx11-primary); transform: translateY(-1px);
}

/* Links */
.idx11-link {
    color: var(--idx11-primary); text-decoration: none; font-weight: 600;
    font-size: 0.85rem; transition: color 0.3s ease; position: relative; padding-bottom: 2px;
}
.idx11-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: linear-gradient(90deg, var(--idx11-primary), var(--idx11-primary-light));
    transition: width 0.3s ease; border-radius: 1px;
}
.idx11-link:hover { color: var(--idx11-primary-dark); }
.idx11-link:hover::after { width: 100%; }

.idx11-signup-text { color: var(--idx11-text-muted); font-size: 0.85rem; }
.idx11-signup-text a { color: var(--idx11-primary); font-weight: 700; text-decoration: none; }
.idx11-signup-text a:hover { text-decoration: underline; }

/* Separator */
.idx11-separator {
    display: flex; align-items: center; text-align: center;
    color: var(--idx11-text-light); font-size: 0.82rem; font-weight: 500;
}
.idx11-separator::before, .idx11-separator::after {
    content: ''; flex: 1; border-bottom: 1px solid var(--idx11-border);
}
.idx11-separator::before { margin-right: 0.75em; }
.idx11-separator::after { margin-left: 0.75em; }

/* Info Banner */
.idx11-info-banner {
    background: linear-gradient(135deg, rgba(var(--idx11-primary-rgb),0.06), rgba(var(--idx11-accent-rgb),0.03));
    border: 1px solid rgba(var(--idx11-primary-rgb),0.12);
    border-left: 3px solid var(--idx11-primary);
    border-radius: var(--idx11-radius-sm); padding: 0.85rem 1rem;
}
.idx11-info-banner i { color: var(--idx11-primary); }
.idx11-info-banner p { color: var(--idx11-text-muted); font-size: 0.82rem; line-height: 1.5; margin: 0; }

/* Trust Footer */
.idx11-trust-footer {
    padding-top: 0.75rem; margin-top: 1rem;
    border-top: 1px solid var(--idx11-border);
    color: var(--idx11-text-light); font-size: 0.8rem;
}
.idx11-trust-footer i { color: var(--idx11-primary); }

/* Registration */
.idx11-register-container .form-control,
.idx11-register-container .form-select {
    background: var(--idx11-input-bg); border: 1.5px solid var(--idx11-input-border);
    border-radius: var(--idx11-radius-sm); transition: all 0.3s ease;
}
.idx11-register-container .form-control:focus,
.idx11-register-container .form-select:focus {
    background: #fff; border-color: var(--idx11-primary);
    box-shadow: 0 0 0 3px rgba(var(--idx11-primary-rgb),0.12);
}
.idx11-register-container label { color: var(--idx11-text-muted); font-size: 0.875rem; font-weight: 500; }
.idx11-register-container .btn-primary {
    background: linear-gradient(135deg, var(--idx11-primary), var(--idx11-primary-dark));
    border: none; border-radius: 50px;
    box-shadow: 0 4px 15px rgba(var(--idx11-primary-rgb),0.3);
    font-weight: 700; transition: all 0.35s ease;
}
.idx11-register-container .btn-primary:hover {
    transform: translateY(-2px); box-shadow: 0 8px 25px rgba(var(--idx11-primary-rgb),0.4);
}
.idx11-register-container .form-check-input:checked { background-color: var(--idx11-primary); border-color: var(--idx11-primary); }
.idx11-register-container a { color: var(--idx11-primary); font-weight: 600; }

/* Status */
#login-status-msg { color: #dc3545; font-size: 0.875rem; font-weight: 500; min-height: 1.2rem; }

/* === Footer === */
.idx11-footer {
    background: #0f172a;
    padding: 0.6rem 0; z-index: 1040;
    flex-shrink: 0;
}
.idx11-footer .nav-link {
    color: rgba(255,255,255,0.55) !important; font-size: 0.82rem; font-weight: 500;
    padding: 0.35rem 0.75rem; border-radius: 50px; transition: all 0.3s ease;
}
.idx11-footer .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.08); }
.idx11-footer .navbar-toggler-icon { filter: invert(1); }
.idx11-footer-text { color: rgba(255,255,255,0.35); font-size: 0.78rem; }

/* Animations */
@keyframes idx11FadeInUp {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}
.idx11-stagger-1 { animation: idx11FadeInUp 0.5s ease-out 0.1s both; }
.idx11-stagger-2 { animation: idx11FadeInUp 0.5s ease-out 0.2s both; }
.idx11-stagger-3 { animation: idx11FadeInUp 0.5s ease-out 0.3s both; }
.idx11-stagger-4 { animation: idx11FadeInUp 0.5s ease-out 0.4s both; }
.idx11-stagger-5 { animation: idx11FadeInUp 0.5s ease-out 0.5s both; }
.idx11-stagger-6 { animation: idx11FadeInUp 0.5s ease-out 0.6s both; }

.grecaptcha-badge { z-index: 9999 !important; }

/* Common */
[data-type="login"] { display: none; }
.reg-agree-label { display: block; }
form.reg_form > legend { display: none; }
form.reg_form label { display: none; }
form.reg_form label.reg-agree-label,
form.reg_form label.aff-check-label { display: block !important; }
.btn-registration { display: block; width: 100%; }

.btn-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn-loading:after {
    content: ''; animation: idx11Loader 500ms infinite linear;
    border: 2px solid #fff; border-radius: 50%;
    border-right-color: transparent !important; border-top-color: transparent !important;
    display: block; height: 1.4em; width: 1.4em;
    position: absolute; left: calc(50% - 0.7em); top: calc(50% - 0.7em);
}
@keyframes idx11Loader { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 991.98px) {
    .idx11-card { flex-direction: column; max-width: 500px; }
    .idx11-image-side { width: 100%; height: 200px; }
    .idx11-form-side { width: 100%; padding: 2rem 1.5rem; }
    .idx11-content { padding-bottom: 1rem; }
}
@media (max-width: 575.98px) {
    .idx11-topbar { padding: 0.75rem 1rem; }
    .idx11-content { padding: 0.5rem 1rem 1rem; }
    .idx11-form-side { padding: 1.5rem 1.25rem; }
    .idx11-title { font-size: 1.2rem; }
    .idx11-image-side { height: 160px; }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* ============================================================
   DARK MODE
   ============================================================ */
[data-bs-theme="dark"] {
    --idx11-text: #e2e8f0;
    --idx11-text-muted: #94a3b8;
    --idx11-text-light: #64748b;
    --idx11-border: rgba(255,255,255,0.08);
    --idx11-input-bg: #161926;
    --idx11-input-border: rgba(255,255,255,0.1);
    --idx11-card-bg: #1a1d2e;
    --aff-text: #e2e8f0;
    --aff-text-muted: #94a3b8;
    --aff-input-bg: #161926;
    --aff-input-border: rgba(255,255,255,0.1);
    --aff-card-bg: #1a1d2e;
}
[data-bs-theme="dark"] body {
    background: #0f1117 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .forny-container,
[data-bs-theme="dark"] .forny-form {
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .forny-container .card {
    background: #1a1d2e !important;
    border-color: rgba(255,255,255,0.08) !important;
}
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
    color: #f1f5f9 !important;
}
[data-bs-theme="dark"] .form-control {
    background: #161926 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.1) !important;
}
[data-bs-theme="dark"] label {
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}
[data-bs-theme="dark"] a:not(.btn) {
    color: #93c5fd;
}

/* Index11-specific dark overrides */
[data-bs-theme="dark"] .idx11-card {
    background: #1a1d2e;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
}
[data-bs-theme="dark"] .idx11-card:hover {
    box-shadow: 0 25px 70px rgba(0,0,0,0.35), 0 6px 20px rgba(0,0,0,0.25);
}
[data-bs-theme="dark"] .idx11-form-side {
    background: #1a1d2e;
}
[data-bs-theme="dark"] .idx11-title {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .idx11-subtitle {
    color: #94a3b8;
}
[data-bs-theme="dark"] .idx11-input:focus {
    background: #1e2235 !important;
}
[data-bs-theme="dark"] .idx11-btn-outline {
    border-color: rgba(255,255,255,0.1);
    color: #94a3b8;
}
[data-bs-theme="dark"] .idx11-btn-outline:hover {
    background: rgba(var(--idx11-primary-rgb),0.08);
    border-color: var(--idx11-primary);
    color: var(--idx11-primary);
}
[data-bs-theme="dark"] .idx11-separator {
    color: #64748b;
}
[data-bs-theme="dark"] .idx11-separator::before,
[data-bs-theme="dark"] .idx11-separator::after {
    border-bottom-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .idx11-signup-text {
    color: #94a3b8;
}
[data-bs-theme="dark"] .language-changer > a {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] .dropdown-menu.country-wrap,
[data-bs-theme="dark"] .country-wrap.dropdown-menu {
    background: #1a1d2e;
    border-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .country-wrap .dropdown-item {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .country-wrap .dropdown-item:hover {
    background: rgba(var(--idx11-primary-rgb),0.1);
}
[data-bs-theme="dark"] .idx11-info-banner {
    background: linear-gradient(135deg, rgba(var(--idx11-primary-rgb),0.08), rgba(var(--idx11-accent-rgb),0.05));
    border-color: rgba(var(--idx11-primary-rgb),0.15);
}
[data-bs-theme="dark"] .idx11-trust-footer {
    border-top-color: rgba(255,255,255,0.08);
    color: #64748b;
}
[data-bs-theme="dark"] .idx11-register-container .form-control:focus,
[data-bs-theme="dark"] .idx11-register-container .form-select:focus {
    background: #1a1d2e;
}
[data-bs-theme="dark"] .idx11-register-container .form-select {
    background-color: #161926;
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] .modal-content {
    background: #1a1d2e !important;
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .modal-header {
    border-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .modal-footer {
    border-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}
