/* TD Academy Auth — tda-auth.css */

.tda-auth-wrap {
    max-width: 480px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Tabs ── */
.tda-tabs {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.tda-tab {
    flex: 1;
    padding: 11px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #666;
    text-decoration: none;
    transition: background .15s, color .15s;
    display: block;
}

.tda-tab--active,
.tda-tab:hover {
    background: #f5f5f5;
    color: #111;
}

/* ── Form layout ── */
.tda-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .tda-form-row { grid-template-columns: 1fr; }
}

.tda-form-group {
    margin-bottom: 1rem;
    position: relative;
}

.tda-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 5px;
}

.tda-req { color: #c0392b; margin-left: 2px; }

/* ── Input ── */
.tda-input {
    width: 100%;
    height: 42px;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    color: #111;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.tda-input:focus {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}

.tda-input::placeholder { color: #aaa; }

/* ── Password toggle ── */
.tda-pw-wrap { position: relative; }
.tda-pw-wrap .tda-input { padding-right: 44px; }

.tda-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 0;
    display: flex;
    align-items: center;
}

.tda-eye:hover { color: #333; }

.tda-forgot {
    text-align: right;
    margin-top: 5px;
    font-size: 12px;
}

.tda-forgot a {
    color: #c0392b;
    text-decoration: none;
}

/* ── Primary button ── */
.tda-btn-primary {
    display: block;
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: #c0392b;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity .15s, transform .1s;
    letter-spacing: .02em;
}

.tda-btn-primary:hover   { opacity: .88; }
.tda-btn-primary:active  { transform: scale(.98); }
.tda-btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* ── Divider ── */
.tda-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0;
    color: #bbb;
    font-size: 12px;
}

.tda-divider::before,
.tda-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

/* ── Google button ── */
.tda-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #d5d5d5;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.tda-google-btn:hover { background: #f8f8f8; }

/* ── Notice ── */
.tda-notice {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1rem;
}

.tda-notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.tda-notice--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ── Terms ── */
.tda-terms {
    font-size: 11.5px;
    color: #888;
    text-align: center;
    margin-top: 10px;
}

.tda-terms a { color: #c0392b; }

/* ── Loading spinner on button ── */
.tda-btn-primary.tda-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tda-spin .6s linear infinite;
    vertical-align: middle;
}

@keyframes tda-spin { to { transform: rotate(360deg); } }
