/* ==========================================================================
   TOP1SUB AUTH PAGES - 100% DOITUONGTAC.COM DIAGONAL SPLIT DESIGN SYSTEM
   Dark default (#09090b) & Light toggle (#ffffff) synced via dtt_theme_preferences,
   Signika typography, flat left form column, diagonal clipped right dark showcase
   with glowing orbs & squash-and-stretch bouncing mascot.
   ========================================================================== */

:root {
    --dtt-bg: #ffffff;
    --dtt-fg: #09090b;
    --dtt-muted-fg: #71717a;
    --dtt-primary: #155dfc;
    --dtt-primary-hover: #1447e6;
    --dtt-primary-fg: #eff6ff;
    --dtt-border: #e4e4e7;
    --auth-input-surface: #ffffff;
    --auth-input-autofill-text: #18181b;
    --dtt-font: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --dtt-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html.dark,
html[data-theme="dark"],
body.dark-mode {
    --dtt-bg: #09090b;
    --dtt-fg: #fafafa;
    --dtt-muted-fg: #9f9fa9;
    --dtt-primary: #193cb8;
    --dtt-primary-hover: #2554e8;
    --dtt-primary-fg: #eff6ff;
    --dtt-border: rgba(255, 255, 255, 0.1);
    --auth-input-surface: #2a2a30;
    --auth-input-autofill-text: #fafafa;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    scrollbar-width: none !important;
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--dtt-font);
    background-color: var(--dtt-bg);
    color: var(--dtt-fg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   SPLIT-SCREEN WRAPPER
   ========================================================================== */
.dtt-auth-root {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--dtt-bg);
}

.dtt-auth-left {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    padding: 40px 16px;
}

@media (min-width: 1024px) {
    .dtt-auth-left {
        width: 45%;
    }
}

@media (min-width: 1280px) {
    .dtt-auth-left {
        width: 40%;
        padding-left: 80px;
        padding-right: 80px;
    }
}

.dtt-auth-left-inner {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 384px; /* max-w-sm */
}

@media (min-width: 1024px) {
    .dtt-auth-left-inner {
        max-width: 448px; /* lg:max-w-md */
    }
}

/* Header Brand Logo Link */
.dtt-auth-brand-row {
    display: flex;
    padding: 0 24px;
    margin-bottom: 40px;
}

.dtt-auth-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 80px; /* h-20 */
    text-decoration: none;
}

.dtt-auth-brand-link .logo-led-wrapper > img,
.dtt-auth-brand-link .brand-title {
    height: 64px !important;
    max-height: 64px !important;
    width: auto !important;
    max-width: 240px !important;
    object-fit: contain !important;
}

@media (max-width: 640px) {
    .dtt-auth-brand-row {
        justify-content: center;
        margin-bottom: 28px;
    }
    .dtt-auth-brand-link .logo-led-wrapper > img,
    .dtt-auth-brand-link .brand-title {
        height: 54px !important;
        max-height: 54px !important;
    }
}

/* Heading & Subtitle */
.dtt-auth-head {
    padding: 24px 24px 0;
}

.dtt-auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--dtt-muted-fg);
    text-decoration: none;
    transition: color 0.16s ease;
}

.dtt-auth-back-link:hover {
    color: var(--dtt-fg);
}

.dtt-auth-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--dtt-fg);
    line-height: 1.4;
}

.dtt-auth-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--dtt-muted-fg);
    line-height: 1.5;
}

/* Form Container */
.dtt-auth-body {
    padding: 24px;
}

.dtt-form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dtt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.dtt-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dtt-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--dtt-fg);
    margin: 0;
}

.dtt-forgot-link {
    font-size: 12px;
    color: var(--dtt-primary);
    text-decoration: none;
    font-weight: 500;
}

html.dark .dtt-forgot-link,
html[data-theme="dark"] .dtt-forgot-link {
    color: #3b82f6;
}

.dtt-forgot-link:hover {
    text-decoration: underline;
}

/* Reference .auth-input-shell & .auth-input-native */
.auth-input-shell {
    position: relative;
    height: 40px; /* h-10 */
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--dtt-border);
    background-color: var(--auth-input-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input-shell:hover {
    border-color: rgba(113, 113, 122, 0.45);
}

.auth-input-shell:focus-within {
    border-color: var(--dtt-primary);
    box-shadow: 0 0 0 2px rgba(21, 93, 252, 0.16);
}

html.dark .auth-input-shell:focus-within,
html[data-theme="dark"] .auth-input-shell:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}

.auth-input-icon {
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--dtt-muted-fg);
    opacity: 0.55;
    z-index: 2;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.auth-input-shell:focus-within .auth-input-icon {
    opacity: 0.9;
    color: var(--dtt-primary);
}

html.dark .auth-input-shell:focus-within .auth-input-icon,
html[data-theme="dark"] .auth-input-shell:focus-within .auth-input-icon {
    color: #60a5fa;
}

.auth-input-native {
    height: 100%;
    width: 100%;
    min-width: 0;
    border: none;
    border-radius: inherit;
    background: transparent;
    padding: 0 12px 0 36px; /* pl-9 pr-3 */
    font-family: inherit;
    font-size: 14px;
    color: var(--dtt-fg);
    outline: none;
}

.auth-input-native::placeholder {
    color: var(--dtt-muted-fg);
    opacity: 0.55;
}

.auth-input-native:-webkit-autofill,
.auth-input-native:-webkit-autofill:hover,
.auth-input-native:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-input-autofill-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--auth-input-surface) inset !important;
    box-shadow: 0 0 0 1000px var(--auth-input-surface) inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* 2-Column Grid for Password & Confirm in Register */
.dtt-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Custom Checkbox Row */
.dtt-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dtt-checkbox {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--dtt-border);
    accent-color: var(--dtt-primary);
    background: var(--auth-input-surface);
    cursor: pointer;
    flex-shrink: 0;
}

.dtt-terms-label {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--dtt-muted-fg);
    cursor: pointer;
}

.dtt-terms-label a {
    color: var(--dtt-primary);
    font-weight: 500;
    text-decoration: none;
}

html.dark .dtt-terms-label a,
html[data-theme="dark"] .dtt-terms-label a {
    color: #3b82f6;
}

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

/* Primary Submit Button (h-9 = 36px, rounded-lg, flat royal blue) */
.dtt-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: none;
    background-color: var(--dtt-primary);
    color: var(--dtt-primary-fg);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.dtt-submit-btn:hover:not(:disabled) {
    background-color: var(--dtt-primary-hover);
}

.dtt-submit-btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Alert Box */
.dtt-alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.dtt-alert--error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.dtt-alert--success {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

html.dark .dtt-alert--error,
html[data-theme="dark"] .dtt-alert--error {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

html.dark .dtt-alert--success,
html[data-theme="dark"] .dtt-alert--success {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Bottom Border Switch Link Bar */
.dtt-switch-bar {
    border-top: 1px solid var(--dtt-border);
    padding: 16px 24px;
    text-align: center;
    font-size: 13.5px;
    color: var(--dtt-muted-fg);
}

.dtt-switch-bar a {
    color: var(--dtt-primary);
    font-weight: 500;
    text-decoration: none;
    margin-left: 4px;
}

html.dark .dtt-switch-bar a,
html[data-theme="dark"] .dtt-switch-bar a {
    color: #3b82f6;
}

.dtt-switch-bar a:hover {
    text-decoration: underline;
}

/* Copyright Line */
.dtt-auth-copyright {
    margin-top: 48px;
    padding: 0 24px;
    text-align: center;
    font-size: 12px;
    color: var(--dtt-muted-fg);
}

@media (min-width: 1024px) {
    .dtt-auth-copyright {
        text-align: left;
    }
}

/* OTP Step 2 & Forgot Reset Step 2 Controls */
.dtt-otp-info {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--dtt-border);
    background: var(--auth-input-surface);
    text-align: center;
    font-size: 13px;
}

.dtt-otp-info strong {
    color: #3b82f6;
    font-family: var(--dtt-mono);
    word-break: break-all;
}

.auth-input-native--otp {
    padding: 0 12px;
    text-align: center;
    font-family: var(--dtt-mono);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.35em;
}

.dtt-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    padding-top: 4px;
}

.dtt-link-btn {
    border: none;
    background: transparent;
    padding: 4px 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--dtt-muted-fg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dtt-link-btn:hover:not(:disabled) {
    color: var(--dtt-fg);
}

.dtt-link-btn--primary {
    color: var(--dtt-primary);
}

html.dark .dtt-link-btn--primary,
html[data-theme="dark"] .dtt-link-btn--primary {
    color: #3b82f6;
}

.dtt-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dtt-token-hint {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--dtt-border);
    background: var(--auth-input-surface);
    font-size: 12.5px;
    color: var(--dtt-muted-fg);
    line-height: 1.5;
}

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

.dtt-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: dttSpin 0.75s linear infinite;
}

/* ==========================================================================
   RIGHT DIAGONAL SHOWCASE COLUMN (ALWAYS DARK #09090b, LG+ ONLY)
   ========================================================================== */
.dtt-auth-right {
    display: none;
    position: relative;
    flex: 1;
}

@media (min-width: 1024px) {
    .dtt-auth-right {
        display: block;
    }
}

.dtt-diagonal-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #09090b;
    background-image: radial-gradient(ellipse at top right, rgba(25, 60, 184, 0.2), #09090b 65%, #09090b 100%);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

.dtt-orb-top-right {
    pointer-events: none;
    position: absolute;
    top: 25%;
    right: 25%;
    width: 500px;
    height: 500px;
    border-radius: 9999px;
    background: rgba(25, 60, 184, 0.1);
    filter: blur(100px);
}

.dtt-orb-bottom-left {
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 40px;
    width: 288px;
    height: 288px;
    border-radius: 9999px;
    background: rgba(25, 60, 184, 0.05);
    filter: blur(64px);
}

.dtt-showcase-center {
    position: relative;
    z-index: 1;
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
    color: #ffffff;
}

/* Animated Squash-and-Stretch Bouncing Mascot (~2.3s loop matching Framer Motion) */
.dtt-mascot-stage {
    position: relative;
    width: 192px;
    height: 192px;
    margin-bottom: 32px;
    transform-origin: bottom center;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.55));
    animation: dttMascotBounce 2.3s cubic-bezier(0.36, 0, 0.66, 1) infinite;
}

@media (min-width: 768px) {
    .dtt-mascot-stage {
        width: 248px;
        height: 248px;
    }
}

.dtt-mascot-svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes dttMascotBounce {
    0%, 100% {
        transform: translateY(0) scaleX(1) scaleY(1);
    }
    45% {
        transform: translateY(-15px) scaleX(1.04) scaleY(0.92);
    }
    55% {
        transform: translateY(-14px) scaleX(1.03) scaleY(0.93);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dtt-mascot-stage {
        animation: none;
    }
}

.dtt-showcase-h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #f4f4f5;
    line-height: 1.2;
}

.dtt-showcase-p {
    margin: 16px auto 0;
    max-width: 448px;
    font-size: 18px;
    line-height: 1.6;
    color: #a1a1aa;
}
