/* ============================================================
   css/portal/page-auth.css
   Phase 4c-1a — Auth-Cluster (login, setup2fa, verify2fa,
                                changePassword)

   Quelle: <style>-Blöcke der vier Auth-Pages.
   Body-class .auth-page scopt alle Bootstrap-Overrides, damit
   sie nicht andere Seiten beeinflussen.
   :root-Tokens und body-Background kommen aus tokens.css/base.css
   via head.php — nicht hier dupliziert.
   ============================================================ */


/* ================================================================
   SHARED — Bootstrap-Overrides für Auth-Theme
   ================================================================ */

body.auth-page .form-control {
    background: var(--hs-bg-input);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    color: var(--hs-text-primary);
    padding: 0.75rem;
    transition: all 0.3s ease;
}
body.auth-page .form-control:focus {
    background: var(--hs-bg-input);
    border-color: var(--hs-accent);
    box-shadow: 0 2px 8px var(--hs-accent-glow);
    color: var(--hs-text-primary);
    outline: none;
}
body.auth-page .form-control::placeholder {
    color: var(--hs-text-muted);
}

body.auth-page .btn-primary {
    background: linear-gradient(135deg, var(--hs-accent), var(--hs-accent-dark));
    border: none;
    color: var(--hs-text-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--hs-radius-sm);
    transition: all 0.3s ease;
}
body.auth-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hs-shadow-accent);
    background: linear-gradient(135deg, var(--hs-accent), var(--hs-accent-dark));
}

body.auth-page .btn-success {
    background: linear-gradient(135deg, var(--hs-success), #009944);
    border: none;
}

body.auth-page .card {
    background: var(--hs-bg-card);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow), var(--hs-shadow-glow);
}

body.auth-page .alert-warning {
    background: rgba(255, 180, 0, 0.15);
    border: 1px solid rgba(255, 180, 0, 0.3);
    color: var(--hs-warning);
    border-radius: var(--hs-radius-sm);
}
body.auth-page .alert-danger {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: var(--hs-error);
    border-radius: var(--hs-radius-sm);
}
body.auth-page .alert-success {
    background: rgba(0, 200, 100, 0.15);
    border: 1px solid rgba(0, 200, 100, 0.3);
    color: var(--hs-success);
    border-radius: var(--hs-radius-sm);
}

/* Code-Input — gemeinsam in setup2fa + verify2fa */
.code-input {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    font-family: monospace;
}


/* ================================================================
   PAGE-SPECIFIC — login.php
   ================================================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--hs-border);
    padding: 30px 20px;
}

.login-card .logo-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--hs-accent), var(--hs-accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--hs-accent-glow);
    transition: all 0.3s ease;
}
.login-card .logo-wrapper:hover {
    box-shadow: 0 0 50px var(--hs-accent-glow);
    transform: scale(1.05);
}
.login-card .logo-wrapper i {
    font-size: 2.5rem;
    color: var(--hs-text-primary);
}

.login-card .card-body { padding: 30px; }

.login-card .card-title {
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--hs-text-primary);
}

.login-card .form-group { margin-bottom: 25px; }
.login-card .form-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hs-text-secondary);
    margin-bottom: 8px;
}

.public-link {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--hs-border);
}
.public-link a {
    color: var(--hs-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.public-link a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--hs-accent);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--hs-text-muted);
    font-size: 0.85rem;
}


/* ================================================================
   PAGE-SPECIFIC — setup2fa.php
   ================================================================ */

.setup-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.setup-card {
    width: 100%;
    max-width: 520px;
}
.setup-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--hs-border);
    padding: 25px 20px;
    text-align: center;
}
.setup-card .logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--hs-accent), var(--hs-accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--hs-accent-glow);
}
.setup-card .logo-wrapper i {
    font-size: 2rem;
    color: var(--hs-text-primary);
}
.setup-card .card-body { padding: 30px; }

.method-option {
    background: rgba(0, 30, 60, 0.8);
    border: 2px solid var(--hs-border);
    border-radius: var(--hs-radius-sm);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.method-option:hover {
    border-color: var(--hs-accent);
    background: rgba(0, 178, 255, 0.05);
}
.method-option.selected {
    border-color: var(--hs-accent);
    box-shadow: 0 0 20px var(--hs-accent-glow);
}
.method-option i {
    font-size: 2.5rem;
    color: var(--hs-accent);
    margin-bottom: 10px;
    display: block;
}

.step { display: none; }
.step.active { display: block; }

.qr-container {
    background: #ffffff;
    padding: 15px;
    border-radius: var(--hs-radius-sm);
    display: inline-block;
    margin: 15px 0;
}
.secret-display {
    background: rgba(0, 30, 60, 0.8);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-sm);
    padding: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    word-break: break-all;
}

.recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 15px 0;
}
.recovery-code {
    background: rgba(0, 30, 60, 0.8);
    border: 1px solid var(--hs-border);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    font-family: monospace;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}
.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.step-dot.active {
    background: var(--hs-accent);
    box-shadow: 0 0 10px var(--hs-accent-glow);
}
.step-dot.done {
    background: var(--hs-success);
}


/* ================================================================
   PAGE-SPECIFIC — verify2fa.php
   ================================================================ */

.verify-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.verify-card {
    width: 100%;
    max-width: 440px;
}

.verify-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--hs-border);
    padding: 30px 20px;
    text-align: center;
}
.verify-card .logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--hs-accent), var(--hs-accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--hs-accent-glow);
}
.verify-card .logo-wrapper i {
    font-size: 2rem;
    color: var(--hs-text-primary);
}
.verify-card .card-body { padding: 30px; }
.verify-card .card-title {
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-align: center;
}

.trust-device {
    background: rgba(0, 30, 60, 0.8);
    border-radius: var(--hs-radius-sm);
    padding: 12px 15px;
    margin-top: 15px;
}

.custom-checkbox .custom-control-label::before {
    background-color: rgba(0, 0, 12, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--hs-accent);
    border-color: var(--hs-accent);
}

.method-switch {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--hs-border);
}
.method-switch a {
    color: var(--hs-accent);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}
.method-switch a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--hs-accent);
}


/* ================================================================
   PAGE-SPECIFIC — changePassword.php
   ================================================================ */

.password-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.password-card {
    width: 100%;
    max-width: 450px;
}

.password-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--hs-border);
    padding: 30px 20px;
    text-align: center;
}
.password-card .logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--hs-warning), #cc9000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 180, 0, 0.4);
}
.password-card .logo-wrapper i {
    font-size: 2.5rem;
    color: var(--hs-text-primary);
}

.password-card .card-body { padding: 30px; }

.password-card .card-title {
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--hs-text-primary);
}
.password-card .card-subtitle {
    color: var(--hs-text-secondary);
    text-align: center;
    margin-bottom: 30px;
}
.password-card .form-group { margin-bottom: 20px; }
.password-card .form-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hs-text-secondary);
    margin-bottom: 8px;
}

.form-text {
    color: var(--hs-text-muted) !important;
    font-size: 0.8rem;
}

.user-info {
    background: rgba(0, 178, 255, 0.1);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-sm);
    padding: 10px 15px;
    margin-bottom: 20px;
    text-align: center;
}
.user-info .username {
    color: var(--hs-accent);
    font-weight: 500;
}
