/* ================================================
   IceHappy - Panel Administrativo Login Styles
   ================================================ */

:root {
    --admin-primary: #0D47A1;
    --admin-secondary: #1565C0;
    --admin-accent: #2196F3;
    --admin-dark: #0A2540;
    --admin-darker: #051425;
    --admin-light: #E3F2FD;
    --admin-white: #FFFFFF;
    --admin-gray: #64748B;
    --admin-gray-light: #F1F5F9;
    --admin-error: #DC2626;
    --admin-success: #16A34A;
    --admin-gradient-1: linear-gradient(135deg, #0D47A1 0%, #1976D2 100%);
    --admin-gradient-2: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--admin-darker);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.admin-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--admin-darker) 0%, #1e293b 100%);
    z-index: -1;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #2196F3 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #1565C0 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Main Container */
.login_container.admin-theme {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1100px;
    display: flex;
    background: var(--admin-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin: 20px;
    min-height: 600px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Panel - Brand */
.brand-panel {
    flex: 0 0 45%;
    background: var(--admin-gradient-1);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-content {
    position: relative;
    z-index: 2;
}

.logo-admin {
    margin-bottom: 30px;
}

.logo-admin img {
    width: 100px;
    height: auto;
    /*filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));*/
}

.brand-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--admin-white);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.brand-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-bottom: 50px;
    letter-spacing: 0.5px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 400;
}

.feature-item svg {
    flex-shrink: 0;
}

/* Right Panel - Login Form */
.login-panel {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--admin-white);
}

.login-content {
    width: 100%;
    max-width: 400px;
}

.login-header-admin {
    margin-bottom: 40px;
}

.login-header-admin h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header-admin p {
    font-size: 14px;
    color: var(--admin-gray);
    font-weight: 400;
    line-height: 1.5;
}

/* Form Elements */
.frm_main {
    position: relative;
}

.input-group-admin {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon-admin {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-gray);
    display: flex;
    align-items: center;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s ease;
}

.admin-input {
    width: 100%;
    padding: 14px 14px 14px 46px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 15px;
    color: var(--admin-dark);
    background: var(--admin-white);
    transition: all 0.3s ease;
    outline: none;
    font-weight: 400;
}

.admin-input::placeholder {
    color: #94A3B8;
}

.admin-input:focus {
    border-color: var(--admin-accent);
    background: #F8FAFC;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.admin-input:focus + .input-icon-admin,
.input-wrapper:focus-within .input-icon-admin {
    color: var(--admin-accent);
}

.admin-input.ro {
    background: var(--admin-gray-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Login Options */
.login-options {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--admin-gray);
    user-select: none;
}

.remember-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--admin-accent);
}

/* Admin Button */
.admin-button {
    width: 100%;
    padding: 15px 24px;
    background: var(--admin-gradient-1);
    border: none;
    border-radius: 10px;
    color: var(--admin-white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
    letter-spacing: 0.3px;
}

.admin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 71, 161, 0.4);
}

.admin-button:active {
    transform: translateY(0);
}

.button-arrow {
    transition: transform 0.3s ease;
}

.admin-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Loader */
#loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.contain-loader {
    text-align: center;
}

.admin-loader {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(13, 71, 161, 0.1);
    border-top-color: var(--admin-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: var(--admin-gray);
    font-weight: 500;
}

#loader.success .spinner-ring {
    border-top-color: var(--admin-success);
}

#loader.success .loading-text {
    color: var(--admin-success);
}

/* Security Notice */
.security-notice {
    margin-top: 30px;
    padding: 14px 18px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--admin-secondary);
}

.security-notice svg {
    flex-shrink: 0;
}

/* Error Tab */
.error_tab.admin-error {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--admin-error);
    color: var(--admin-white);
    padding: 16px 28px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    z-index: 1000;
    animation: errorSlideUp 0.3s ease-out;
    opacity: 0;
    pointer-events: none;
    max-width: 90%;
}

.error_tab.admin-error.active {
    opacity: 1;
    pointer-events: auto;
}

@keyframes errorSlideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.error_tab svg {
    flex-shrink: 0;
}

/* Footer */
.admin-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 1000;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-content strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login_container.admin-theme {
        max-width: 900px;
    }
    
    .brand-panel {
        flex: 0 0 42%;
        padding: 50px 40px;
    }
    
    .brand-title {
        font-size: 36px;
    }
    
    .login-panel {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .login_container.admin-theme {
        flex-direction: column;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        min-height: auto;
        margin: 10px;
    }
    
    .brand-panel {
        flex: 0 0 auto;
        padding: 40px 30px;
        text-align: center;
    }
    
    .brand-panel::before {
        display: none;
    }
    
    .logo-admin {
        margin-bottom: 20px;
    }
    
    .logo-admin img {
        width: 80px;
    }
    
    .brand-title {
        font-size: 32px;
    }
    
    .brand-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .brand-features {
        display: none;
    }
    
    .login-panel {
        padding: 40px 30px;
    }
    
    .login-content {
        max-width: 100%;
    }
    
    .login-header-admin h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login_container.admin-theme {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin: 10px;
        border-radius: 16px;
    }
    
    .brand-panel,
    .login-panel {
        padding: 30px 25px;
    }
    
    .brand-title {
        font-size: 28px;
    }
    
    .login-header-admin {
        margin-bottom: 30px;
    }
    
    .login-header-admin h2 {
        font-size: 22px;
    }
    
    .input-group-admin {
        margin-bottom: 20px;
    }
    
    .admin-input {
        padding: 12px 12px 12px 42px;
        font-size: 14px;
    }
    
    .admin-button {
        padding: 13px 20px;
        font-size: 14px;
    }
    
    .security-notice {
        font-size: 12px;
        padding: 12px 16px;
    }
}

/* Accessibility */
.admin-input:focus-visible,
.admin-button:focus-visible {
    outline: 3px solid var(--admin-accent);
    outline-offset: 2px;
}

.remember-check:focus-within {
    outline: 2px solid var(--admin-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .admin-input {
        border-width: 3px;
    }
    
    .admin-button {
        border: 2px solid var(--admin-white);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .admin-background,
    .error_tab,
    .admin-footer,
    .security-notice {
        display: none;
    }
    
    .brand-panel {
        background: var(--admin-white);
        color: var(--admin-dark);
    }
}
