/* CSS Variables - Brand Guide Colors */
:root {
    --background: #FAFAFA;
    --foreground: #1e293b;
    --card: #ffffff;
    --card-foreground: #1e293b;
    --primary: #B30000;
    --primary-hover: #8a0000;
    --primary-light: #fff5f5;
    --primary-foreground: #ffffff;
    --secondary: #1e293b;
    --secondary-foreground: #ffffff;
    --muted: #e2e8f0;
    --muted-foreground: #475569;
    --success: #008000;
    --success-foreground: #ffffff;
    --destructive: #ef4444;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #B30000;
    --radius: 0.625rem;
    --shadow-soft: 0 1px 3px 0 rgba(30, 41, 59, 0.06), 0 1px 2px -1px rgba(30, 41, 59, 0.06);
    --shadow-card: 0 4px 6px -1px rgba(30, 41, 59, 0.07), 0 2px 4px -2px rgba(30, 41, 59, 0.07);
}

/* Layout */
.autoaltai-settings-container {
    min-height: 100vh;
    padding: 1rem;
}

@media (min-width: 640px) {
    .autoaltai-settings-container {
    padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .autoaltai-settings-container {
    padding: 2rem;
    }
}

.autoaltai-settings-wrapper {
    max-width: 56rem;
    margin: 0 auto;
}

/* Header */
.autoaltai-header {
    text-align: center;
    margin-bottom: 2rem;
}

.autoaltai-logo {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: var(--shadow-card);
    position: relative;
}

.autoaltai-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
}

.autoaltai-logo::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 0.75rem;
    background: rgba(179, 0, 0, 0.2);
    filter: blur(8px);
    z-index: -1;
}

.autoaltai-logo-text {
    font-weight: 700;
    color: var(--primary-foreground);
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.autoaltai-header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: -0.025em;
    margin-bottom: 0.375rem;
}

.autoaltai-header-subtitle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    max-width: 24rem;
    margin: 0 auto;
}

/* Cards Grid */
.autoaltai-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .autoaltai-cards-grid {
    grid-template-columns: 1fr 1fr;
    }
}

/* Card */
.autoaltai-card {
    background: var(--card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.autoaltai-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.autoaltai-card-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.autoaltai-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.autoaltai-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

.autoaltai-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 0;
    margin-bottom: 0.125rem;
}

.autoaltai-card-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.autoaltai-card-content {
    padding: 1.25rem;
}

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

.autoaltai-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.autoaltai-input-wrapper {
    position: relative;
}

.autoaltai-input-icon {
    display: flex;
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
}

.autoaltai-input-icon svg {
    width: 1rem;
    height: 1rem;
}

.autoaltai-form-input {
    width: 100%;
    height: 2.75rem;
    padding: 0 0.75rem 0 2.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--foreground);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    color: #373737;
    transition: all 0.2s ease;
}

.autoaltai-form-input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(179, 0, 0, 0.1);
}

.autoaltai-form-input::placeholder {
    color: var(--muted-foreground);
}

.autoaltai-form-input.autoaltai-has-toggle {
    padding-right: 2.5rem;
}

.autoaltai-input-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.autoaltai-input-toggle:hover {
    color: var(--foreground);
}

.autoaltai-input-toggle svg {
    width: 1rem;
    height: 1rem;
}

/* Button */
.autoaltai-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    line-height: 16px;
    border-radius: 0;
    margin: 0;
    cursor: pointer;
    transition: 400ms;
    text-transform: capitalize;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background-color: var(--primarycolor);
    color: var(--whitecolor);
}

.autoaltai-btn:hover {
    background-color: var(--secondarycolor);
    color: var(--primarycolor);
}

.autoaltai-btn:active {
    transform: scale(0.98);
}

.autoaltai-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.autoaltai-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Helper Text */
.autoaltai-helper-text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-align: center;
    margin-top: 1rem;
}

/* Error Message */
.autoaltai-error-message {
    font-size: 0.875rem;
    color: var(--destructive);
    margin-top: 0.5rem;
}

.autoaltai-success-message {
    font-size: 0.875rem;
    color: var(--success);
    margin-top: 0.5rem;
}

/* Footer */
.autoaltai-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.autoaltai-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.autoaltai-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.autoaltai-footer-link svg {
    width: 0.875rem;
    height: 0.875rem;
}

.autoaltai-footer-separator {
    color: var(--border);
}

/* Success State */
.autoaltai-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.autoaltai-success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.autoaltai-success-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--success);
}

.autoaltai-success-text {
    text-align: center;
}

.autoaltai-success-title {
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.autoaltai-success-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Animations */
@keyframes autoaltai-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes autoaltai-scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes autoaltai-checkBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.autoaltai-animate-fade-in {
    animation: autoaltai-fadeIn 0.3s ease-out forwards;
}

.autoaltai-animate-scale-in {
    animation: autoaltai-scaleIn 0.3s ease-out forwards;
}

.autoaltai-animate-check-bounce {
    animation: autoaltai-checkBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Spinner */
.autoaltai-spinner {
    animation: autoaltai-spin 1s linear infinite;
}

@keyframes autoaltai-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* OTP Input */
.autoaltai-otp-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.autoaltai-otp-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--foreground);
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.2s ease;
}

.autoaltai-otp-input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(179, 0, 0, 0.1);
}

/* Back Button */
.autoaltai-back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.autoaltai-back-button:hover {
    color: var(--foreground);
}

.autoaltai-back-button svg {
    width: 1rem;
    height: 1rem;
}

/* Resend Link */
.autoaltai-resend-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: center;
    margin-top: 1rem;
}

.autoaltai-resend-link {
    color: var(--primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    text-decoration: underline;
}

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

.autoaltai-resend-link:disabled {
    color: var(--muted-foreground);
    cursor: not-allowed;
    text-decoration: none;
}