:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.login-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.login-header h1 i {
    color: var(--primary-color);
}

.login-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Steps */
.login-step {
    display: none;
}

.login-step.active {
    display: block;
}

/* Step info */
.step-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #eff6ff;
    border-radius: var(--radius);
    border: 1px solid #bfdbfe;
}

.step-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.step-info p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.375rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.875rem;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* TOTP Input speziell */
#totp-code,
#setup-totp-code {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    text-align: center;
    padding-left: 2.5rem;
    font-family: 'Inter', monospace;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-full {
    width: 100%;
}

.btn-link {
    background: none;
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-link:hover {
    color: var(--primary-color);
}

/* QR Code */
#qr-container {
    text-align: center;
    margin: 1.5rem 0;
}

#qr-code-img {
    max-width: 200px;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
}

.secret-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.secret-display p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.secret-display code {
    display: inline-block;
    background-color: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    letter-spacing: 0.1rem;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* Error Message */
.error-message {
    margin-top: 1rem;
    padding: 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--danger-color);
    background-color: transparent;
    border-radius: var(--radius);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.error-message.visible {
    max-height: 100px;
    padding: 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}
