/* ═══ AUTH — Faza 2 dizayn ═══ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    position: relative;
    z-index: 2;
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 15, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px 24px 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.logo {
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ee2a7b 0%, #6228d7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ─── TABS ─── */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-3, #6b6b80);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.auth-tab.active {
    background: linear-gradient(135deg, rgba(238, 42, 123, 0.9), rgba(98, 40, 215, 0.9));
    color: #fff;
    box-shadow: 0 4px 14px rgba(238, 42, 123, 0.35);
}

/* ─── VIEWS ─── */
.auth-view {
    display: none;
    animation: fadeIn 0.3s ease;
}
.auth-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── FIELDS ─── */
.auth-field {
    margin-bottom: 14px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3, #8a8a9c);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-field input,
.auth-field select,
.auth-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-select:focus {
    border-color: rgba(238, 42, 123, 0.6);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(238, 42, 123, 0.15);
}

.auth-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-field input.input-error {
    border-color: #ef4444;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ─── PASSWORD TOGGLE ─── */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    padding-right: 48px;
}

.pw-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.pw-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* ─── USERNAME STATUS ─── */
.username-status {
    position: absolute;
    right: 14px;
    font-size: 18px;
    pointer-events: none;
}

.username-status.checking::after {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ee2a7b;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.username-status.ok::after {
    content: '✓';
    color: #22c55e;
    font-weight: 900;
    font-size: 20px;
}

.username-status.err::after {
    content: '✕';
    color: #ef4444;
    font-weight: 900;
    font-size: 18px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── BUTTONS ─── */
.btn-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ee2a7b 0%, #6228d7 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(238, 42, 123, 0.35);
    transition: all 0.2s;
    margin-top: 6px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(238, 42, 123, 0.5);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.link-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 700;
    padding: 14px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    transition: color 0.2s;
}

.link-btn:hover {
    color: #fff;
}

.link-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── WIZARD ─── */
.wizard-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wizard-back {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.wizard-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wizard-back:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-steps {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.wizard-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.wizard-step-dot.active {
    background: linear-gradient(135deg, #ee2a7b, #6228d7);
    box-shadow: 0 0 12px rgba(238, 42, 123, 0.7);
    transform: scale(1.3);
}

.wizard-step-dot.done {
    background: #22c55e;
}

.wizard-step-num {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    min-width: 34px;
    text-align: right;
}

.wizard-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-panel.active {
    display: block;
}

.wizard-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
}

.wizard-desc {
    font-size: 13px;
    color: var(--text-3, #8a8a9c);
    margin: 0 0 20px;
    line-height: 1.5;
}

.wizard-hint {
    font-size: 12px;
    color: #ef4444;
    min-height: 16px;
    margin-bottom: 12px;
    padding-left: 4px;
    font-weight: 700;
}

.wizard-hint.ok {
    color: #22c55e;
}

/* ─── CODE INPUTS ─── */
.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.code-inputs input {
    width: 46px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    outline: none;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
}

.code-inputs input:focus {
    border-color: rgba(238, 42, 123, 0.8);
    background: rgba(238, 42, 123, 0.08);
    box-shadow: 0 0 0 3px rgba(238, 42, 123, 0.15);
}

.code-inputs input.filled {
    border-color: rgba(238, 42, 123, 0.5);
}

/* ─── PASSWORD STRENGTH ─── */
.pw-strength {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    margin: -6px 0 14px;
    overflow: hidden;
    transition: all 0.3s;
}

.pw-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: all 0.3s;
}

.pw-strength.weak::after {
    width: 33%;
    background: #ef4444;
}

.pw-strength.medium::after {
    width: 66%;
    background: #f59e0b;
}

.pw-strength.strong::after {
    width: 100%;
    background: #22c55e;
}

/* ─── SUCCESS ─── */
.wizard-success {
    text-align: center;
    padding: 20px 0;
}

.wizard-success-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #22c55e;
    animation: successPulse 1.5s ease infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
}

/* ─── FORGOT MODAL ─── */
.forgot-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.forgot-modal.open {
    display: flex;
}

.forgot-content {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 15, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.forgot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.forgot-header h2 {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}

.forgot-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.forgot-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.forgot-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 20px;
    gap: 3px;
}

.forgot-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 9px;
    font-family: inherit;
    transition: all 0.2s;
}

.forgot-tab.active {
    background: rgba(238, 42, 123, 0.2);
    color: #ee2a7b;
}

.forgot-panel {
    display: none;
}

.forgot-panel.active {
    display: block;
}

.forgot-question-text {
    padding: 14px 16px;
    background: rgba(238, 42, 123, 0.08);
    border: 1px solid rgba(238, 42, 123, 0.25);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.4;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 380px) {
    .auth-box { padding: 24px 16px; }
    .code-inputs input { width: 40px; height: 50px; font-size: 18px; }
}