/* =========================================
   DTECH Auth Module — Styles
   Uses --dtech-* tokens from dtech-tokens.css
   ========================================= */

/* ==========================================
   RESET & WRAPPER
   ========================================== */
.dtech-auth-wrapper,
.dtech-auth-wrapper *,
.dtech-auth-wrapper *::before,
.dtech-auth-wrapper *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

.dtech-auth-wrapper {
    font-family: var(--dtech-geo) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--dtech-black) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--dtech-g100) !important;
}

.dtech-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.dtech-auth-container {
    width: 100%;
    max-width: 440px;
}

/* ==========================================
   LOGO BAR
   ========================================== */
.dtech-auth-logo {
    text-align: center;
    margin-bottom: 0;
    background: var(--dtech-dark);
    padding: 20px 32px;
    border-radius: 8px 8px 0 0;
}

.dtech-auth-logo img {
    height: 42px;
    width: auto;
}

.dtech-auth-logo-text {
    font-family: var(--dtech-latin) !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    color: var(--dtech-white) !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==========================================
   CARD
   ========================================== */
.dtech-auth-card {
    background: var(--dtech-white) !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden;
}

.dtech-auth-body {
    padding: 36px 32px;
}

.dtech-auth-title {
    font-family: var(--dtech-latin) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: var(--dtech-red) !important;
    margin-bottom: 6px !important;
    text-align: left;
}

.dtech-auth-subtitle {
    font-family: var(--dtech-geo) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--dtech-black) !important;
    margin-bottom: 32px !important;
    text-align: left;
    line-height: 1.3 !important;
}

.dtech-auth-subtitle strong {
    color: var(--dtech-red) !important;
    font-weight: 700 !important;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */
.dtech-form-group {
    position: relative;
    margin-bottom: 16px;
}

.dtech-form-group label {
    display: block !important;
    position: static !important;
    transform: none !important;
    font-family: var(--dtech-latin) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--dtech-g500) !important;
    margin-bottom: 6px !important;
    background: transparent !important;
    padding: 0 !important;
    pointer-events: auto !important;
}

.dtech-form-group input[type="text"],
.dtech-form-group input[type="email"],
.dtech-form-group input[type="password"],
.dtech-form-group input[type="tel"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    border: 1.5px solid var(--dtech-g200) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: var(--dtech-geo) !important;
    color: var(--dtech-black) !important;
    background: var(--dtech-white) !important;
    outline: none !important;
    transition: all 0.2s var(--dtech-ease) !important;
    box-shadow: none !important;
}

.dtech-form-group input[type="text"]:focus,
.dtech-form-group input[type="email"]:focus,
.dtech-form-group input[type="password"]:focus,
.dtech-form-group input[type="tel"]:focus {
    border-color: var(--dtech-red) !important;
    box-shadow: 0 0 0 3px rgba(185, 30, 35, 0.08) !important;
    outline: none !important;
}

.dtech-form-group input[type="text"]:hover,
.dtech-form-group input[type="email"]:hover,
.dtech-form-group input[type="password"]:hover,
.dtech-form-group input[type="tel"]:hover {
    border-color: var(--dtech-g400) !important;
}

.dtech-form-group input.error {
    border-color: var(--dtech-red) !important;
}

/* Password toggle */
.dtech-password-toggle {
    position: absolute;
    right: 12px;
    bottom: 14px;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 4px !important;
    color: var(--dtech-g400) !important;
    transition: color 0.2s !important;
    box-shadow: none !important;
    outline: none !important;
}

.dtech-password-toggle:hover,
.dtech-password-toggle:focus {
    color: var(--dtech-red) !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dtech-password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Email locked state */
.dtech-email-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--dtech-g50) !important;
    border: 1.5px solid var(--dtech-g200) !important;
    border-radius: 6px !important;
    margin-bottom: 16px;
}

.dtech-email-locked-text {
    flex: 1;
    font-family: var(--dtech-mono) !important;
    font-size: 13px !important;
    color: var(--dtech-black) !important;
    font-weight: 500 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dtech-email-edit {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 4px !important;
    color: var(--dtech-g400) !important;
    transition: color 0.2s !important;
    flex-shrink: 0;
    box-shadow: none !important;
}

.dtech-email-edit:hover {
    color: var(--dtech-red) !important;
}

.dtech-email-edit svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ==========================================
   BUTTONS
   ========================================== */
.dtech-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 20px !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: var(--dtech-latin) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.2s var(--dtech-ease) !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.dtech-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dtech-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Primary */
.dtech-btn-primary {
    background: var(--dtech-red) !important;
    color: var(--dtech-white) !important;
    border: none !important;
}

.dtech-btn-primary:hover:not(:disabled) {
    background: var(--dtech-red-h) !important;
    color: var(--dtech-white) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(185, 30, 35, 0.3) !important;
}

.dtech-btn-primary:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* Secondary */
.dtech-btn-secondary {
    background: transparent !important;
    color: var(--dtech-g600) !important;
    border: 1.5px solid var(--dtech-g200) !important;
}

.dtech-btn-secondary:hover:not(:disabled) {
    border-color: var(--dtech-g400) !important;
    color: var(--dtech-black) !important;
    background: transparent !important;
}

.dtech-btn-secondary svg {
    color: var(--dtech-red) !important;
}

/* ==========================================
   DIVIDER
   ========================================== */
.dtech-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    font-family: var(--dtech-latin) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--dtech-g400) !important;
}

.dtech-divider::before,
.dtech-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dtech-g200) !important;
}

/* ==========================================
   OTP INPUTS
   ========================================== */
.dtech-otp-inputs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
}

.dtech-otp-inputs input {
    width: 48px !important;
    height: 56px !important;
    text-align: center !important;
    font-family: var(--dtech-mono) !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    border: 1.5px solid var(--dtech-g200) !important;
    border-radius: 6px !important;
    outline: none !important;
    transition: all 0.2s var(--dtech-ease) !important;
    padding: 0 !important;
    background: var(--dtech-white) !important;
    color: var(--dtech-black) !important;
    box-shadow: none !important;
}

.dtech-otp-inputs input:focus {
    border-color: var(--dtech-red) !important;
    box-shadow: 0 0 0 3px rgba(185, 30, 35, 0.08) !important;
}

.dtech-otp-inputs input.filled {
    border-color: var(--dtech-red) !important;
    background: rgba(185, 30, 35, 0.02) !important;
}

/* ==========================================
   TIMER
   ========================================== */
.dtech-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--dtech-geo) !important;
    font-size: 13px !important;
    color: var(--dtech-g500) !important;
    margin-bottom: 24px;
}

.dtech-timer svg {
    width: 14px;
    height: 14px;
    color: var(--dtech-g400) !important;
}

.dtech-timer-value {
    font-family: var(--dtech-mono) !important;
    font-weight: 600 !important;
    color: var(--dtech-black) !important;
}

.dtech-timer.expired {
    color: var(--dtech-red) !important;
}

.dtech-timer.expired .dtech-timer-value {
    color: var(--dtech-red) !important;
}

/* ==========================================
   OPTIONS ROW
   ========================================== */
.dtech-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dtech-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dtech-checkbox-inline input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    border: 2px solid var(--dtech-g300) !important;
    border-radius: 3px !important;
    cursor: pointer;
    accent-color: var(--dtech-red) !important;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.dtech-checkbox-inline input[type="checkbox"]:checked {
    background-color: var(--dtech-red) !important;
    border-color: var(--dtech-red) !important;
}

.dtech-checkbox-inline label {
    position: static !important;
    transform: none !important;
    font-family: var(--dtech-geo) !important;
    font-size: 13px !important;
    color: var(--dtech-g500) !important;
    cursor: pointer;
    background: transparent !important;
    padding: 0 !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* ==========================================
   LINKS
   ========================================== */
.dtech-link {
    color: var(--dtech-red) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    transition: color 0.2s !important;
    cursor: pointer;
    background: none !important;
    border: none !important;
    font-family: var(--dtech-geo) !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.dtech-link:hover {
    color: var(--dtech-red-h) !important;
    text-decoration: underline !important;
}

.dtech-back-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 20px;
    font-family: var(--dtech-geo) !important;
    font-size: 13px !important;
    color: var(--dtech-g500) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    width: 100%;
    box-shadow: none !important;
}

.dtech-back-link:hover {
    color: var(--dtech-red) !important;
}

.dtech-back-link svg {
    width: 14px;
    height: 14px;
}

/* ==========================================
   MESSAGES
   ========================================== */
.dtech-message {
    padding: 12px 14px;
    border-radius: 6px;
    font-family: var(--dtech-geo) !important;
    font-size: 13px !important;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dtech-message svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.dtech-message.success {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #16a34a !important;
}

.dtech-message.error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
}

.dtech-message.info {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #2563eb !important;
}

/* ==========================================
   CARD FOOTER
   ========================================== */
.dtech-auth-card-footer {
    padding: 16px 32px;
    background: var(--dtech-g50) !important;
    border-top: 1px solid var(--dtech-g200) !important;
    text-align: center;
}

.dtech-auth-card-footer p {
    font-family: var(--dtech-geo) !important;
    font-size: 13px !important;
    color: var(--dtech-g500) !important;
    margin: 0 !important;
}

.dtech-auth-card-footer a {
    color: var(--dtech-red) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.dtech-auth-card-footer a:hover {
    text-decoration: underline !important;
    color: var(--dtech-red-h) !important;
}

/* ==========================================
   PAGE FOOTER
   ========================================== */
.dtech-page-footer {
    padding: 24px 20px;
    text-align: center;
}

.dtech-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dtech-footer-links a {
    font-family: var(--dtech-geo) !important;
    font-size: 12px !important;
    color: var(--dtech-g400) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.dtech-footer-links a:hover {
    color: var(--dtech-red) !important;
}

.dtech-footer-copyright {
    font-family: var(--dtech-mono) !important;
    font-size: 11px !important;
    color: var(--dtech-g400) !important;
    margin: 0 !important;
}

/* ==========================================
   RESEND ROW
   ========================================== */
.dtech-resend-row {
    text-align: center;
    font-family: var(--dtech-geo) !important;
    font-size: 13px !important;
    color: var(--dtech-g500) !important;
    margin-bottom: 20px;
}

.dtech-resend-btn {
    color: var(--dtech-red) !important;
    font-weight: 600 !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-family: var(--dtech-geo) !important;
    font-size: inherit !important;
    padding: 0 !important;
    transition: color 0.2s !important;
}

.dtech-resend-btn:hover:not(:disabled) {
    color: var(--dtech-red-h) !important;
    text-decoration: underline !important;
}

.dtech-resend-btn:disabled {
    color: var(--dtech-g400) !important;
    cursor: not-allowed !important;
}

/* ==========================================
   FORM STATES
   ========================================== */
.dtech-state {
    display: none;
}

.dtech-state.active {
    display: block;
    animation: dtechFadeIn 0.25s var(--dtech-ease);
}

@keyframes dtechFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   HONEYPOT
   ========================================== */
.dtech-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================
   PASSWORD STRENGTH
   ========================================== */
.dtech-password-strength {
    margin-top: 6px;
    margin-bottom: 14px;
}

.dtech-strength-bar {
    height: 3px;
    background: var(--dtech-g200) !important;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.dtech-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s var(--dtech-ease);
    border-radius: 2px;
}

.dtech-strength-fill.weak   { width: 33%;  background: var(--dtech-red) !important; }
.dtech-strength-fill.medium { width: 66%;  background: #f59e0b !important; }
.dtech-strength-fill.strong { width: 100%; background: var(--dtech-green) !important; }

.dtech-strength-text {
    font-family: var(--dtech-mono) !important;
    font-size: 11px !important;
    color: var(--dtech-g400) !important;
}

.dtech-strength-text.weak   { color: var(--dtech-red) !important; }
.dtech-strength-text.medium { color: #f59e0b !important; }
.dtech-strength-text.strong { color: var(--dtech-green) !important; }

/* ==========================================
   LOADING SPINNER
   ========================================== */
.dtech-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    animation: dtechSpin 0.7s linear infinite;
}

.dtech-btn-secondary .dtech-spinner {
    border-color: rgba(0,0,0,0.1) !important;
    border-top-color: var(--dtech-red) !important;
}

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

/* ==========================================
   TWO-COLUMN GRID (register form)
   ========================================== */
.dtech-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 480px) {
    .dtech-auth-main {
        padding: 16px 12px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .dtech-auth-body {
        padding: 28px 20px;
    }

    .dtech-auth-card-footer {
        padding: 14px 20px;
    }

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

    .dtech-options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dtech-auth-subtitle {
        font-size: 18px !important;
    }

    .dtech-form-row {
        grid-template-columns: 1fr;
    }
}
