/* ============================================
   AUTH PAGES STYLES - Modern Login Layout
   ============================================ */

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

body {
    font-family: 'SF Pro Display', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Theme (Default) */
body.theme-dark {
    background: #1a1d23;
    color: #fff;
}

/* Light Theme */
body.theme-light {
    background: #EBF1F3;
    color: #333333;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Gradient circles - Dark */
body.theme-dark .gradient-circle-1 {
    background: radial-gradient(circle, rgba(255, 140, 0, 0.2) 0%, transparent 70%);
}

body.theme-dark .gradient-circle-2 {
    background: radial-gradient(circle, rgba(255, 140, 0, 0.15) 0%, transparent 70%);
}

/* Gradient circles - Light */
body.theme-light .gradient-circle-1 {
    background: radial-gradient(circle, rgba(245, 134, 30, 0.35) 0%, transparent 70%);
}

body.theme-light .gradient-circle-2 {
    background: radial-gradient(circle, rgba(245, 134, 30, 0.35) 0%, transparent 70%);
}

.gradient-circle-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(60px);
    transform: translate(-50%, -50%);
    z-index: 1;
    transition: background 0.3s ease;
}

.gradient-circle-2 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 1000px;
    height: 1000px;
    border-radius: 50%;
    filter: blur(60px);
    transform: translate(33%, 33%);
    z-index: 1;
    transition: background 0.3s ease;
}

/* Grid pattern - Dark */
body.theme-dark .grid-pattern {
    background-image:
        linear-gradient(rgba(255, 140, 0, 0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 140, 0, 0.03) 2px, transparent 2px);
}

/* Grid pattern - Light */
body.theme-light .grid-pattern {
    background-image:
        linear-gradient(rgba(245, 134, 30, 0.05) 3px, transparent 3px),
        linear-gradient(90deg, rgba(245, 134, 30, 0.05) 3px, transparent 3px);
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-size: 50px 50px;
    z-index: 1;
    transition: background-image 0.3s ease;
}

/* Geometric shapes - Dark */
body.theme-dark .shape-1 {
    border: 2px solid rgba(255, 140, 0, 0.2);
}

body.theme-dark .shape-2 {
    border: 2px solid rgba(255, 140, 0, 0.1);
}

body.theme-dark .shape-3 {
    border: 2px solid rgba(255, 140, 0, 0.15);
}

/* Geometric shapes - Light */
body.theme-light .shape-1 {
    border: 2px solid rgba(245, 134, 30, 0.15);
}

body.theme-light .shape-2 {
    border: 2px solid rgba(245, 134, 30, 0.1);
}

body.theme-light .shape-3 {
    border: 2px solid rgba(245, 134, 30, 0.12);
}

.shape-1 {
    position: absolute;
    top: 25%;
    left: 2.5rem;
    width: 8rem;
    height: 8rem;
    transform: rotate(45deg);
    border-radius: 0.75rem;
    z-index: 1;
    transition: border-color 0.3s ease;
}

.shape-2 {
    position: absolute;
    bottom: 25%;
    right: 4rem;
    width: 10rem;
    height: 10rem;
    transform: rotate(12deg);
    border-radius: 50%;
    z-index: 1;
    transition: border-color 0.3s ease;
}

.shape-3 {
    position: absolute;
    top: 50%;
    right: 25%;
    width: 6rem;
    height: 6rem;
    transform: rotate(-12deg);
    z-index: 1;
    transition: border-color 0.3s ease;
}

/* Floating dots - Dark */
body.theme-dark .dot {
    background: rgba(255, 140, 0, 0.4);
}

/* Floating dots - Light */
body.theme-light .dot {
    background: rgba(245, 134, 30, 0.3);
}

.dot {
    position: absolute;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
    transition: background 0.3s ease;
}

.dot-1 {
    top: 5rem;
    right: 33%;
    width: 0.75rem;
    height: 0.75rem;
}

.dot-2 {
    bottom: 8rem;
    left: 25%;
    width: 0.5rem;
    height: 0.5rem;
    animation-delay: 0.3s;
}

.dot-3 {
    top: 33%;
    left: 5rem;
    width: 1rem;
    height: 1rem;
    animation-delay: 0.7s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* SVG Abstract Lines - Dark */
body.theme-dark .svg-lines path,
body.theme-dark .svg-lines circle {
    stroke: #ff8c00;
    opacity: 0.1;
}

/* SVG Abstract Lines - Light */
body.theme-light .svg-lines path,
body.theme-light .svg-lines circle {
    stroke: #f5861e;
    opacity: 0.15;
}

.svg-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Auth Card - Dark */
body.theme-dark .auth-card {
    background: rgba(37, 41, 48, 0.95);
    border: 2px solid rgba(255, 140, 0, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Auth Card - Light */
body.theme-light .auth-card {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(245, 134, 30, 0.95);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.auth-card {
    width: 100%;
    max-width: 32rem;
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2.5rem;
    position: relative;
    z-index: 10;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-title-container {
    text-align: center;
    margin-bottom: 2rem;
}

/* Tenant Logo */
.tenant-logo {
    display: block;
    margin: 0 auto 1rem;
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

/* Logo Loading */
.logo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 80px;
    margin: 0 auto 1rem;
}

.logo-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

body.theme-dark .logo-loading-spinner {
    border-color: rgba(255, 140, 0, 0.3);
    border-top-color: #ff8c00;
}

body.theme-light .logo-loading-spinner {
    border-color: rgba(245, 134, 30, 0.3);
    border-top-color: #f5861e;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-title-container.loading .gdpro-title {
    display: none;
}

/* Title - Dark */
body.theme-dark .auth-title-container h1 {
    color: #fff;
}

body.theme-dark .auth-title-container h1 .highlight {
    color: #ff8c00;
}

/* Title - Light */
body.theme-light .auth-title-container h1 {
    color: #333333;
}

body.theme-light .auth-title-container h1 .highlight {
    color: #f5861e;
}

.auth-title-container h1 {
    font-size: 3.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.auth-title-container h1 .highlight {
    transition: color 0.3s ease;
}

.welcome-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Divider - Dark */
body.theme-dark .divider-line {
    background: #ff8c00;
}

body.theme-dark .welcome-text {
    color: #fff;
}

body.theme-dark .auth-subtitle {
    color: #9ca3af;
}

/* Divider - Light */
body.theme-light .divider-line {
    background: #f5861e;
}

body.theme-light .welcome-text {
    color: #333333;
}

body.theme-light .auth-subtitle {
    color: #515055;
}

.divider-line {
    height: 1px;
    width: 5rem;
    transition: background 0.3s ease;
}

.welcome-text {
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

/* Form Styles */
.form-group-custom {
    position: relative;
    margin-bottom: 1.25rem;
}

/* Icon - Dark */
body.theme-dark .form-icon {
    color: #9ca3af;
}

/* Icon - Light */
body.theme-light .form-icon {
    color: #515055;
}

.form-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.3s ease;
}

/* Input - Dark */
body.theme-dark .form-input-custom {
    background: #1a1d23;
    border: 1px solid #3a3f47;
    color: #fff;
}

body.theme-dark .form-input-custom::placeholder {
    color: #6b7280;
}

body.theme-dark .form-input-custom:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

/* Input - Light */
body.theme-light .form-input-custom {
    background: #ffffff;
    border: 1px solid #e4e5e9;
    color: #333333;
}

body.theme-light .form-input-custom::placeholder {
    color: #888888;
}

body.theme-light .form-input-custom:focus {
    border-color: #f5861e;
    box-shadow: 0 0 0 3px rgba(245, 134, 30, 0.1);
}

.form-input-custom {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    height: 3rem;
    transition: all 0.2s;
}

/* Fix para autocomplete do navegador */
.form-input-custom:-webkit-autofill,
.form-input-custom:-webkit-autofill:hover,
.form-input-custom:-webkit-autofill:focus {
    -webkit-text-fill-color: inherit;
    -webkit-box-shadow: 0 0 0px 1000px inherit inset;
    transition: background-color 5000s ease-in-out 0s;
}

body.theme-dark .form-input-custom:-webkit-autofill,
body.theme-dark .form-input-custom:-webkit-autofill:hover,
body.theme-dark .form-input-custom:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px #1a1d23 inset;
}

body.theme-light .form-input-custom:-webkit-autofill,
body.theme-light .form-input-custom:-webkit-autofill:hover,
body.theme-light .form-input-custom:-webkit-autofill:focus {
    -webkit-text-fill-color: #333333;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
}

.form-input-custom.is-invalid {
    border-color: #ef4444;
}

.invalid-feedback {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Checkbox and Forgot Password */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-custom {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Checkbox Label - Dark */
body.theme-dark .checkbox-label {
    color: #9ca3af;
}

/* Checkbox Label - Light */
body.theme-light .checkbox-label {
    color: #515055;
}

.checkbox-label {
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

/* Checkbox accent - Dark */
body.theme-dark .checkbox-custom {
    accent-color: #ff8c00;
}

/* Checkbox accent - Light */
body.theme-light .checkbox-custom {
    accent-color: #f5861e;
}

/* Links - Dark */
body.theme-dark .auth-link {
    color: #ff8c00;
}

body.theme-dark .auth-link:hover {
    color: #ff9d1f;
}

/* Links - Light */
body.theme-light .auth-link {
    color: #f5861e;
}

body.theme-light .auth-link:hover {
    color: #ff9d1f;
}

.auth-link {
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

/* Submit Button - Dark */
body.theme-dark .btn-submit {
    background: #ff8c00;
    box-shadow: 0 10px 15px -3px rgba(255, 140, 0, 0.2);
}

body.theme-dark .btn-submit:hover {
    background: #ff9d1f;
    box-shadow: 0 10px 15px -3px rgba(255, 140, 0, 0.3);
}

/* Submit Button - Light */
body.theme-light .btn-submit {
    background: #f5861e;
    box-shadow: 0 10px 15px -3px rgba(245, 134, 30, 0.2);
}

body.theme-light .btn-submit:hover {
    background: #ff9d1f;
    box-shadow: 0 10px 15px -3px rgba(245, 134, 30, 0.3);
}

.btn-submit {
    width: 100%;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    height: 3rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Alert Messages */
.alert-custom {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

/* Footer - Dark */
body.theme-dark .auth-footer {
    color: #6b7280;
}

/* Footer - Light */
body.theme-light .auth-footer {
    color: #888888;
}

.auth-footer {
    text-align: center;
    font-size: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Theme Toggle - Dark */
body.theme-dark .theme-toggle {
    border-color: rgba(255, 140, 0, 0.3);
    color: #ff8c00;
}

body.theme-dark .theme-toggle:hover {
    background: rgba(255, 140, 0, 0.1);
    border-color: rgba(255, 140, 0, 0.5);
}

/* Theme Toggle - Light */
body.theme-light .theme-toggle {
    border-color: rgba(245, 134, 30, 0.3);
    color: #f5861e;
    background: rgba(255, 255, 255, 0.9);
}

body.theme-light .theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(245, 134, 30, 0.5);
}

.theme-toggle i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-title-container h1 {
        font-size: 2.5rem;
    }

    .shape-1,
    .shape-2,
    .shape-3 {
        display: none;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .theme-toggle i {
        font-size: 1rem;
    }
}

