/* ============================================
   Teenostars — Unified Design System
   (Marketing, Auth, Registration — not Dashboard)
   ============================================ */

:root {
    --ts-primary: #99E9A5;
    --ts-primary-2: #9066FB;
    --ts-gradient-from: #331C9C;
    --ts-gradient-mid: #3847EF;
    --ts-gradient-to: #9066FB;
    --ts-dark: #030216;
    --ts-dark-2: #0F1928;
    --ts-text: #E8ECF4;
    --ts-text-muted: #9BA3B5;
    --ts-card-bg: rgba(15, 25, 40, 0.85);
    --ts-card-border: rgba(153, 233, 165, 0.15);
    --ts-input-bg: rgba(255, 255, 255, 0.06);
    --ts-input-border: rgba(255, 255, 255, 0.12);
    --ts-radius: 16px;
    --ts-radius-sm: 10px;
    --ts-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    --ts-font-fa: 'IRANSans', 'IranYekan', Tahoma, sans-serif;
    --ts-font-en: 'Lexend Deca', sans-serif;
}

/* ---- Locale & Direction ---- */
html[lang="fa"] body,
html[lang="fa"] .locale-text {
    font-family: var(--ts-font-fa);
    direction: rtl;
}

html[lang="en"] body,
html[lang="en"] .locale-text {
    font-family: var(--ts-font-en);
    direction: ltr;
}

html[lang="fa"] .locale-text p,
html[lang="fa"] .locale-text h3 {
    text-align: justify;
}

html[lang="en"] .locale-text p,
html[lang="en"] .locale-text h3 {
    text-align: left;
}

/* ---- Header improvements ---- */
.ts-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    flex-wrap: nowrap;
}

.site-header .header__main-wrap .container {
    padding-inline: clamp(20px, 4vw, 48px);
}

.header__logo {
    flex-shrink: 0;
    line-height: 0;
}

.header__logo a {
    display: inline-flex;
    align-items: center;
}

.ts-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ts-lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px 6px;
}

.ts-lang-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
    opacity: 0.6;
}

.ts-lang-switcher a:hover,
.ts-lang-switcher a.active {
    background: rgba(153, 233, 165, 0.15);
    opacity: 1;
    transform: scale(1.05);
}

.ts-lang-switcher img {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.ts-login-link {
    color: var(--ts-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
}

.ts-login-link:hover {
    color: var(--ts-primary);
    border-color: var(--ts-primary);
    background: rgba(153, 233, 165, 0.08);
}

.header__logo img {
    height: 72px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* ---- Footer improvements ---- */
.footer__cta h4 {
    color: var(--ts-text);
    line-height: 1.8;
}

.footer__cta .cta-number {
    color: var(--ts-text-muted);
    font-size: 15px;
}

.footer__cta-social li a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ts-text);
    transition: all 0.25s;
}

.footer__cta-social li a:hover {
    background: linear-gradient(135deg, var(--ts-gradient-mid), var(--ts-gradient-to));
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.site-footer .crm-community {
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

/* ---- Homepage image polish ---- */
.ts-img-rounded {
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.ts-img-rounded:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(56, 71, 239, 0.2);
}

.hero-image img.ts-img-rounded {
    border-radius: 20px;
}

/* ---- Auth pages ---- */
.ts-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--ts-dark);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(56, 71, 239, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(144, 102, 251, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(153, 233, 165, 0.08) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

.ts-auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/img/shape/h_shape6.png') no-repeat -10% 20% / 300px,
                url('/assets/img/shape/h_shape8.png') no-repeat 110% 60% / 250px;
    opacity: 0.15;
    pointer-events: none;
}

.ts-auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.ts-auth-container--wide {
    max-width: 900px;
}

.ts-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.ts-auth-logo a {
    display: inline-block;
}

.ts-auth-logo img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.ts-auth-card {
    background: var(--ts-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ts-card-border);
    border-radius: var(--ts-radius);
    padding: 40px 36px;
    box-shadow: var(--ts-shadow);
}

.ts-auth-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 8px;
}

.ts-auth-card .ts-auth-subtitle {
    text-align: center;
    color: var(--ts-text-muted);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.ts-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ts-auth-form label.ts-label {
    display: block;
    color: var(--ts-text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ts-auth-form input[type="email"],
.ts-auth-form input[type="password"],
.ts-auth-form input[type="text"],
.ts-auth-form input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--ts-radius-sm);
    border: 1px solid var(--ts-input-border);
    background: var(--ts-input-bg);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ts-auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.ts-auth-form input:focus {
    border-color: var(--ts-primary-2);
    box-shadow: 0 0 0 3px rgba(144, 102, 251, 0.2);
}

.ts-auth-form .ts-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ts-text-muted);
}

.ts-auth-form .ts-remember input[type="checkbox"] {
    accent-color: var(--ts-primary-2);
    width: 16px;
    height: 16px;
}

.ts-btn-primary {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--ts-radius-sm);
    background: linear-gradient(90deg, var(--ts-gradient-mid), var(--ts-gradient-to));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 4px;
}

.ts-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(144, 102, 251, 0.4);
}

.ts-auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

.ts-auth-link a {
    color: var(--ts-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.ts-auth-link a:hover {
    color: var(--ts-primary-2);
}

.ts-auth-errors {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--ts-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #fca5a5;
    font-size: 13px;
    list-style: none;
}

.ts-auth-errors li + li {
    margin-top: 4px;
}

.ts-auth-success {
    background: rgba(153, 233, 165, 0.12);
    border: 1px solid rgba(153, 233, 165, 0.3);
    border-radius: var(--ts-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: var(--ts-primary);
    font-size: 13px;
}

/* OTP inputs */
.ts-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
    direction: ltr;
}

.ts-otp-inputs input {
    width: 48px;
    height: 56px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--ts-input-border);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-input-bg);
    color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ts-otp-inputs input:focus {
    border-color: var(--ts-primary-2);
    box-shadow: 0 0 0 3px rgba(144, 102, 251, 0.25);
}

/* Register split layout */
.ts-auth-split {
    display: flex;
    flex-direction: row-reverse;
    max-width: 900px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--ts-shadow);
    border: 1px solid var(--ts-card-border);
}

.ts-auth-split__form {
    flex: 2;
    padding: 40px;
    background: var(--ts-card-bg);
    backdrop-filter: blur(20px);
}

.ts-auth-split__info {
    flex: 1;
    background: linear-gradient(160deg, var(--ts-gradient-from), var(--ts-gradient-to));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
    text-align: center;
}

.ts-auth-split__info .ts-info-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.ts-auth-split__info h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 12px;
}

.ts-auth-split__info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
}

/* ---- Registration form ---- */
.ts-form-page {
    padding: 120px 0 80px;
    min-height: 60vh;
}

.ts-form-hero {
    text-align: center;
    margin-bottom: 48px;
}

.ts-form-hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.ts-form-hero p {
    color: var(--ts-text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.ts-registration-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--ts-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ts-card-border);
    border-radius: var(--ts-radius);
    padding: 40px;
    box-shadow: var(--ts-shadow);
}

.ts-registration-form h3 {
    color: var(--ts-primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ts-registration-form h4,
.ts-registration-form h5 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
}

.ts-registration-form label {
    display: block;
    color: var(--ts-text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ts-registration-form .required-star {
    color: #f87171;
    margin-inline-start: 4px;
}

.ts-registration-form input[type="text"],
.ts-registration-form input[type="date"],
.ts-registration-form input[type="number"],
.ts-registration-form textarea,
.ts-registration-form select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--ts-input-border);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-input-bg);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ts-registration-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239BA3B5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}

html[lang="en"] .ts-registration-form select {
    background-position: right 14px center;
    padding-left: 14px;
    padding-right: 36px;
}

.ts-registration-form input:focus,
.ts-registration-form textarea:focus,
.ts-registration-form select:focus {
    border-color: var(--ts-primary-2);
    box-shadow: 0 0 0 3px rgba(144, 102, 251, 0.15);
}

.ts-registration-form textarea {
    min-height: 100px;
    resize: vertical;
}

.ts-registration-form select option {
    background: var(--ts-dark-2);
    color: #fff;
}

.ts-form-section {
    margin-bottom: 36px;
}

.ts-form-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ts-radius-sm);
    padding: 20px;
    margin-bottom: 16px;
}

.ts-form-card .button-container button {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.ts-form-card .button-container button:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
}

.ts-registration-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--ts-gradient-mid), var(--ts-gradient-to));
    color: #fff;
    border: none;
    border-radius: var(--ts-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 12px;
}

.ts-registration-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(144, 102, 251, 0.4);
}

.ts-error-message {
    color: #fca5a5;
    font-size: 12px;
    margin-top: -12px;
    margin-bottom: 12px;
}

.ts-success-banner {
    max-width: 800px;
    margin: 100px auto 0;
    background: rgba(153, 233, 165, 0.12);
    border: 1px solid rgba(153, 233, 165, 0.3);
    color: var(--ts-primary);
    padding: 16px 24px;
    border-radius: var(--ts-radius-sm);
    text-align: center;
    font-weight: 600;
}

/* ---- Admin registration list ---- */
.ts-admin-page {
    padding: 120px 0 80px;
}

.ts-admin-page h1 {
    text-align: center;
    color: #fff;
    font-size: 28px;
    margin-bottom: 40px;
}

.ts-admin-card {
    max-width: 900px;
    margin: 0 auto 24px;
    background: var(--ts-card-bg);
    border: 1px solid var(--ts-card-border);
    border-radius: var(--ts-radius);
    padding: 28px;
    box-shadow: var(--ts-shadow);
}

.ts-admin-card h2 {
    color: var(--ts-primary);
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ts-admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.ts-admin-table th,
.ts-admin-table td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
}

html[lang="en"] .ts-admin-table th,
html[lang="en"] .ts-admin-table td {
    text-align: left;
}

.ts-admin-table th {
    color: var(--ts-text-muted);
    font-weight: 600;
    width: 35%;
}

.ts-admin-table td {
    color: var(--ts-text);
}

.ts-section-title {
    background: linear-gradient(90deg, var(--ts-gradient-mid), var(--ts-gradient-to));
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 12px;
    text-align: center;
}

.ts-export-btn {
    display: block;
    margin: 40px auto 0;
    padding: 14px 32px;
    background: linear-gradient(90deg, var(--ts-gradient-mid), var(--ts-gradient-to));
    color: #fff;
    border: none;
    border-radius: var(--ts-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ts-export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(144, 102, 251, 0.4);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .ts-auth-split {
        flex-direction: column;
    }

    .ts-auth-split__info {
        padding: 28px 20px;
    }

    .ts-registration-form {
        padding: 24px 20px;
        margin: 0 16px;
    }

    .ts-otp-inputs input {
        width: 42px;
        height: 50px;
        font-size: 18px;
    }

    .ts-header-bar {
        padding: 10px 0;
        gap: 16px;
    }

    .header__logo img {
        height: 52px;
    }

    .ts-header-actions {
        gap: 8px;
    }

    .ts-login-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}
