/* ========================================
   Modern Dark Theme Login Page
   Tecnologia GPS - 2025
   ======================================== */

/* CSS Variables for easy theming */
:root {
    --primary-color: #2FA4C7;
    --primary-dark: #1B7C99;
    --primary-light: #4dd0e1;
    --bg-dark-1: #0f1419;
    --bg-dark-2: #1a2332;
    --bg-dark-3: #1e2936;
    --bg-card: rgba(30, 41, 54, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-modern-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark-1) 0%, var(--bg-dark-2) 50%, var(--bg-dark-1) 100%);
    background-attachment: fixed;
    height: 100vh;
    max-height: 100vh;
    color: var(--text-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Animated background pattern */
body.login-modern-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(47, 164, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(27, 124, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header Styles */
.login-header {
    position: relative;
    z-index: 100;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 15px 40px;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.login-header .header-content h1 {
    font-size: 24px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

/* Main Content */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    position: relative;
    z-index: 1;
    min-height: 0;
    overflow-y: auto;
}

.login-wrapper {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Panel - Company Info */
.login-info-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 35px 30px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    min-height: 420px;
}

.company-logo {
    width: 100%;
    max-width: 280px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.company-logo img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.contact-info {
    width: 100%;
    text-align: center;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.contact-info p {
    margin: 10px 0;
    font-size: 14px;
    transition: var(--transition);
}

/* All contact links styling */
.contact-info a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-info a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.contact-info a:hover::before {
    left: 100%;
}

.contact-info a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 164, 199, 0.2);
}

/* Icon styling - for image icons */
.contact-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: contain;
    transition: var(--transition);
}

/* Icon hover effect */
.contact-info a:hover .contact-icon {
    transform: scale(1.1);
}

/* Text styling */
.contact-text {
    font-size: 14px;
    line-height: 1.4;
}

/* WhatsApp specific */
.contact-info .phone {
    font-weight: 600;
}

.contact-info .phone a {
    color: var(--primary-light);
}

.contact-info .phone .contact-text {
    font-size: 15px;
}

.contact-info .phone a:hover {
    color: var(--text-primary);
}

/* Email specific */
.contact-info .email a {
    color: var(--text-secondary);
}

.contact-info .email a:hover {
    color: var(--primary-light);
}

/* Website specific */
.contact-info .website a {
    color: var(--text-secondary);
}

.contact-info .website a:hover {
    color: var(--primary-light);
}

/* Right Panel - Login Form */
.login-form-panel {
    animation: fadeIn 0.8s ease-out 0.3s both;
    height: 100%;
    display: flex;
    align-items: center;
}

.form-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-card h2 {
    font-size: 22px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    filter: grayscale(100%) brightness(1.8);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 15px 14px 45px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder {
    color: var(--text-muted);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 164, 199, 0.2);
}

/* Form Options Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.forgot-link:hover {
    color: var(--text-primary);
}

.forgot-link:hover::after {
    width: 100%;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 164, 199, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(5px);
}

/* Footer */
.login-footer {
    position: relative;
    z-index: 100;
    padding: 12px 40px;
    background: rgba(15, 20, 25, 0.8);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.copyright {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    letter-spacing: 0.5px;
}

/* Responsive Design */

/* Large tablets and small desktops (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        max-width: 800px;
    }

    .login-header .header-content h1 {
        font-size: 22px;
    }

    .form-card {
        padding: 30px 25px;
        min-height: 380px;
    }

    .login-info-panel {
        padding: 30px 25px;
        min-height: 380px;
    }
}

/* Tablets portrait (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 500px;
    }

    .login-header .header-content h1 {
        font-size: 22px;
    }

    .login-info-panel {
        padding: 30px 20px;
    }

    .company-logo {
        max-width: 300px;
    }

    .form-card {
        padding: 35px 25px;
    }

    .form-card h2 {
        font-size: 22px;
    }
}

/* Very small screens warning - below 600px */
@media (max-width: 599px) {
    body.login-modern-page::after {
        content: 'Para melhor experiência, utilize um tablet ou computador';
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 152, 0, 0.95);
        color: white;
        padding: 15px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        z-index: 10000;
    }

    .login-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .login-header .header-content h1 {
        font-size: 18px;
        padding: 10px;
    }

    .login-info-panel,
    .form-card {
        padding: 20px 15px;
    }

    .company-logo {
        max-width: 250px;
    }
}

/* High resolution screens */
@media (min-width: 1440px) {
    .login-wrapper {
        max-width: 1400px;
    }

    .login-header .header-content h1 {
        font-size: 32px;
    }

    .form-card h2 {
        font-size: 28px;
    }
}

/* Print styles */
@media print {
    body.login-modern-page {
        background: white;
    }

    .login-footer,
    .btn-login,
    .forgot-link {
        display: none;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form-card,
    .login-info-panel {
        border: 2px solid var(--text-primary);
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        border-width: 2px;
    }
}

/* ========================================
   Modern Dark Theme for PNotify Notifications
   ======================================== */

.login-modern-page .ui-pnotify {
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
}

.login-modern-page .ui-pnotify .ui-pnotify-container {
    background: var(--bg-card) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    padding: 20px !important;
    min-width: 300px;
    max-width: 400px;
}

/* Error notification (red accent) */
.login-modern-page .ui-pnotify .ui-pnotify-container.error,
.login-modern-page .ui-pnotify .ui-pnotify-container[class*="error"] {
    border-left: 4px solid #ef5350 !important;
}

/* Success notification (green accent) */
.login-modern-page .ui-pnotify .ui-pnotify-container.success,
.login-modern-page .ui-pnotify .ui-pnotify-container[class*="success"] {
    border-left: 4px solid #66bb6a !important;
}

/* Info notification (blue accent) */
.login-modern-page .ui-pnotify .ui-pnotify-container.info,
.login-modern-page .ui-pnotify .ui-pnotify-container[class*="info"] {
    border-left: 4px solid var(--primary-light) !important;
}

.login-modern-page .ui-pnotify .ui-pnotify-title {
    color: var(--text-primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.5px;
}

.login-modern-page .ui-pnotify .ui-pnotify-text {
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    white-space: pre-line !important;
}

.login-modern-page .ui-pnotify .ui-pnotify-icon {
    color: var(--text-primary) !important;
    margin-right: 12px !important;
}

/* Close button */
.login-modern-page .ui-pnotify .ui-pnotify-closer {
    color: var(--text-muted) !important;
    transition: var(--transition);
}

.login-modern-page .ui-pnotify .ui-pnotify-closer:hover {
    color: var(--text-primary) !important;
}

/* Animation */
.login-modern-page .ui-pnotify {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Password Recovery Modal
   ======================================== */

.recovery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.recovery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.recovery-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 480px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.recovery-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recovery-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.recovery-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.recovery-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.recovery-modal-body {
    padding: 25px 30px;
}

.recovery-modal-description {
    margin: 0 0 15px 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.recovery-form-group {
    margin-bottom: 0;
}

.recovery-input-wrapper {
    position: relative;
}

.recovery-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    opacity: 0.6;
    pointer-events: none;
    z-index: 10;
    filter: grayscale(100%) brightness(1.8);
}

.recovery-input-wrapper input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
}

.recovery-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.recovery-input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 164, 199, 0.2);
}

.recovery-help-text {
    margin: 15px 0 0 0 !important;
}

.recovery-help-text small {
    color: var(--text-muted);
    font-size: 13px;
}

.recovery-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.recovery-btn-cancel,
.recovery-btn-submit {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.recovery-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recovery-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.recovery-btn-submit {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.recovery-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 164, 199, 0.4);
}

.recovery-btn-submit:active {
    transform: translateY(0);
}

/* Responsive adjustments for modal */
@media (max-width: 600px) {
    .recovery-modal-content {
        width: 95%;
        max-width: none;
    }

    .recovery-modal-header,
    .recovery-modal-body,
    .recovery-modal-footer {
        padding: 20px;
    }

    .recovery-modal-footer {
        flex-direction: column;
    }

    .recovery-btn-cancel,
    .recovery-btn-submit {
        width: 100%;
    }
}
