/* ================================================
   IceHappy - Portal de Clientes Login Styles
   ================================================ */

:root {
    --ice-primary: #00A8E8;
    --ice-secondary: #007EA7;
    --ice-accent: #00D4FF;
    --ice-light: #E8F7FF;
    --ice-dark: #003459;
    --ice-gradient-start: #00A8E8;
    --ice-gradient-end: #0077B6;
    --ice-white: #FFFFFF;
    --ice-error: #FF6B6B;
    --ice-success: #51CF66;
    --shadow-light: rgba(0, 168, 232, 0.1);
    --shadow-medium: rgba(0, 168, 232, 0.2);
    --shadow-strong: rgba(0, 52, 89, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.ice-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ice-gradient-start) 0%, var(--ice-gradient-end) 100%);
    z-index: -1;
}

.ice-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.ice-drops {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ice-drops::before,
.ice-drops::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: drop 15s infinite;
}

.ice-drops::before {
    width: 300px;
    height: 300px;
    top: -150px;
    left: 10%;
    animation-delay: 0s;
}

.ice-drops::after {
    width: 200px;
    height: 200px;
    top: -100px;
    right: 20%;
    animation-delay: 7s;
}

@keyframes drop {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.1; }
    100% { transform: translateY(100vh) scale(1.5); opacity: 0; }
}

/* Login Container */
.login_container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo-main {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px var(--shadow-medium));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--ice-white);
    margin-bottom: 8px;
    text-shadow: 0 2px 8px var(--shadow-strong);
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 1px;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.welcome-message {
    text-align: center;
    margin-bottom: 35px;
}

.welcome-message h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--ice-dark);
    margin-bottom: 8px;
}

.welcome-message p {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Form Elements */
.frm_main {
    position: relative;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ice-secondary);
    display: flex;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.ice-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #E0E7EF;
    border-radius: 12px;
    font-size: 15px;
    color: var(--ice-dark);
    background: var(--ice-white);
    transition: all 0.3s ease;
    outline: none;
}

.ice-input::placeholder {
    color: #999;
}

.ice-input:focus {
    border-color: var(--ice-primary);
    background: var(--ice-light);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.1);
}

.ice-input.ro {
    background: #F5F7FA;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Login Button */
.ice-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--ice-primary) 0%, var(--ice-secondary) 100%);
    border: none;
    border-radius: 12px;
    color: var(--ice-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 25px;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.ice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.ice-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px var(--shadow-medium);
}

.button-text {
    flex: 1;
    text-align: center;
}

.button-icon {
    transition: transform 0.3s ease;
}

.ice-button:hover .button-icon {
    transform: translateX(5px);
}

/* Loader */
#loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.contain-loader {
    text-align: center;
}

.ice-loader {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.ice-cube {
    width: 12px;
    height: 12px;
    background: var(--ice-primary);
    border-radius: 3px;
    animation: iceBounce 1.4s infinite ease-in-out both;
}

.ice-cube:nth-child(1) {
    animation-delay: -0.32s;
}

.ice-cube:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes iceBounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 14px;
    color: var(--ice-secondary);
    font-weight: 500;
}

/* Login Footer */
.login-footer {
    margin-top: 25px;
    text-align: center;
}

.help-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Error Tab */
.error_tab {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ice-error);
    color: var(--ice-white);
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    z-index: 1000;
    animation: errorSlide 0.3s ease-out;
    opacity: 0;
    pointer-events: none;
}

.error_tab.active {
    opacity: 1;
    pointer-events: auto;
}

@keyframes errorSlide {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.error_tab svg {
    flex-shrink: 0;
}

.error-message {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 500px) {
    .login_container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .app-title {
        font-size: 26px;
    }
    
    .app-subtitle {
        font-size: 14px;
    }
    
    .logo-main {
        width: 100px;
    }
    
    .welcome-message h2 {
        font-size: 22px;
    }
    
    .ice-input {
        padding: 14px 14px 14px 45px;
        font-size: 14px;
    }
    
    .ice-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 25px 20px;
    }
    
    .app-title {
        font-size: 24px;
    }
}

/* Accessibility */
.ice-input:focus-visible,
.ice-button:focus-visible {
    outline: 3px solid var(--ice-accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .ice-background,
    .error_tab {
        display: none;
    }
}
