/* Login-specific styles */
.tg-auth-wrap {
    min-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 48px 0;
}

.tg-auth-grid {
    width: 100%;
    background: var(--tg-white);
    border: 1px solid var(--tg-ink-100);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--tg-shadow-md);
}

.tg-auth-side {
    background:
        linear-gradient(180deg, rgba(10,31,68,0.94) 0%, rgba(16,42,92,0.97) 100%),
        radial-gradient(circle at 18% 8%, rgba(224,122,31,0.32) 0%, transparent 48%),
        radial-gradient(circle at 88% 92%, rgba(196,97,22,0.18) 0%, transparent 52%);
    background-color: var(--tg-green-900);
    color: #E6ECF7;
    padding: 48px 44px;
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.tg-auth-side::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.tg-auth-side > * { position: relative; z-index: 1; }

.tg-auth-eyebrow {
    font-family: var(--tg-font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--tg-gold-500);
    text-transform: uppercase;
}
.tg-auth-title {
    font-family: var(--tg-font-serif);
    font-weight: 500;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 14px 0 18px;
}
.tg-auth-title em {
    font-style: italic;
    color: var(--tg-gold-500);
    font-weight: 400;
}
.tg-auth-lede {
    font-size: 15px;
    color: #B8C4D9;
    line-height: 1.6;
    max-width: 38ch;
}

.tg-auth-bullets {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 14px;
}
.tg-auth-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    color: #B8C4D9;
    line-height: 1.5;
}
.tg-auth-bullets i {
    color: var(--tg-gold-500);
    margin-top: 3px;
    width: 16px;
    min-width: 16px;
    flex-shrink: 0;
    text-align: center;
    display: inline-block;
    font-size: 13px;
}

/* Leadership rows (left rail) */
.tg-leaders {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 14px;
}
.tg-leader {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(224, 122, 31, 0.22);
    border-radius: 10px;
    backdrop-filter: blur(2px);
}
.tg-leader-photo {
    width: 64px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(224, 122, 31, 0.32);
    position: relative;
}
.tg-leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tg-leader-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(224, 122, 31, 0.75);
    font-family: var(--tg-font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background:
        repeating-linear-gradient(
            45deg,
            rgba(224, 122, 31, 0.05) 0,
            rgba(224, 122, 31, 0.05) 6px,
            transparent 6px,
            transparent 12px
        );
}
.tg-leader-fallback i {
    font-size: 18px;
    opacity: 0.7;
}
.tg-leader-meta {
    min-width: 0;
    flex: 1;
}
.tg-leader-role {
    font-family: var(--tg-font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tg-gold-500);
    margin-bottom: 4px;
}
.tg-leader-name {
    font-family: var(--tg-font-serif);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.2;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}
.tg-leader-sub {
    font-size: 12px;
    color: #9DABC4;
    margin-top: 3px;
}

.tg-auth-meta {
    margin-top: 36px;
    font-family: var(--tg-font-mono);
    font-size: 11px;
    color: rgba(184,196,217,0.6);
    letter-spacing: 0.06em;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
}

.tg-auth-form {
    padding: 56px 56px;
    background: var(--tg-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tg-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tg-paper-2);
    border: 1px solid var(--tg-ink-100);
    color: var(--tg-ink-700);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tg-step-pill .num {
    background: var(--tg-green-800);
    color: #fff;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px;
}

.tg-form-title {
    font-family: var(--tg-font-serif);
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 16px 0 8px;
    color: var(--tg-ink-900);
}
.tg-form-sub {
    color: var(--tg-ink-500);
    font-size: 14px;
    margin-bottom: 28px;
}

/* User identified card */
.tg-user-found {
    border: 1px solid var(--tg-green-100);
    background: var(--tg-green-50);
    border-radius: var(--tg-radius);
    padding: 14px 16px;
    margin: 18px 0 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.tg-user-found .avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--tg-green-800);
    color: var(--tg-gold-500);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--tg-font-serif);
    font-weight: 700;
    font-size: 17px;
}
.tg-user-found .name {
    font-family: var(--tg-font-serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-ink-900);
    line-height: 1.2;
}
.tg-user-found .meta {
    font-size: 12.5px;
    color: var(--tg-ink-500);
    margin-top: 2px;
}
.tg-user-found .check {
    margin-left: auto;
    color: var(--tg-green-700);
    font-size: 18px;
}

/* OTP boxes */
.tg-otp-row {
    display: flex;
    gap: 10px;
    margin: 8px 0 10px;
}
.tg-otp-input {
    width: 52px; height: 60px;
    text-align: center;
    font-family: var(--tg-font-serif);
    font-size: 22px;
    font-weight: 600;
    border: 1.5px solid var(--tg-ink-100);
    background: var(--tg-white);
    border-radius: 8px;
    color: var(--tg-ink-900);
    transition: border-color .15s, box-shadow .15s;
}
.tg-otp-input:focus {
    outline: none;
    border-color: var(--tg-green-700);
    box-shadow: 0 0 0 3px rgba(22, 55, 118, 0.15);
}
.tg-otp-input.filled {
    border-color: var(--tg-green-700);
    background: var(--tg-green-50);
}
.tg-otp-input.error {
    border-color: var(--tg-danger);
    background: #FCEDEC;
    animation: tg-shake .35s;
}
@keyframes tg-shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Circular timer */
.tg-timer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 12px 14px;
    background: var(--tg-paper-2);
    border-radius: var(--tg-radius-sm);
}
.tg-timer-circle {
    --p: 100;
    --size: 44px;
    width: var(--size); height: var(--size);
    border-radius: 50%;
    background:
        conic-gradient(var(--tg-green-700) calc(var(--p) * 1%), var(--tg-ink-100) 0);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.tg-timer-circle::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--tg-paper-2);
    border-radius: 50%;
}
.tg-timer-circle span {
    position: relative;
    z-index: 1;
    font-family: var(--tg-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--tg-ink-900);
}
.tg-timer-text {
    font-size: 13px;
    color: var(--tg-ink-500);
    margin-left: 12px;
    flex: 1;
}
.tg-timer-text b { color: var(--tg-ink-900); font-weight: 600; }

.tg-resend-btn {
    background: transparent;
    border: none;
    color: var(--tg-green-800);
    font-weight: 600;
    font-size: 13.5px;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.tg-resend-btn:disabled {
    color: var(--tg-ink-300);
    text-decoration: none;
    cursor: not-allowed;
}

.tg-attempts {
    font-size: 12.5px;
    color: var(--tg-ink-500);
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tg-attempts.warn { color: var(--tg-warning); }
.tg-attempts.danger { color: var(--tg-danger); font-weight: 600; }
.tg-attempts .dots { display: inline-flex; gap: 4px; }
.tg-attempts .dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--tg-green-700);
    transition: background .2s;
}
.tg-attempts .dots span.used { background: var(--tg-ink-100); }
.tg-attempts.danger .dots span:not(.used) { background: var(--tg-danger); }

/* Inline alert */
.tg-alert {
    border-radius: var(--tg-radius-sm);
    padding: 10px 14px;
    font-size: 13.5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
}
.tg-alert.error { background: #FCEDEC; color: var(--tg-danger); border: 1px solid #F5C9C5; }
.tg-alert.success { background: var(--tg-green-50); color: var(--tg-green-800); border: 1px solid var(--tg-green-100); }
.tg-alert i { margin-top: 2px; }

.tg-back-link {
    background: transparent;
    border: none;
    color: var(--tg-ink-500);
    font-size: 13px;
    padding: 0;
    margin-bottom: 16px;
}
.tg-back-link:hover { color: var(--tg-green-800); }

/* Responsive */
@media (max-width: 991.98px) {
    .tg-auth-form { padding: 36px 28px; }
    .tg-auth-side { padding: 36px 28px; }
    .tg-auth-title { font-size: 28px; }
}
@media (max-width: 575.98px) {
    .tg-otp-input { width: 42px; height: 52px; font-size: 18px; }
    .tg-otp-row { gap: 6px; }
}
