/* Sales Portal Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #e5f1ff 0%, #a9cbff 35%, #4f97ff 70%, #1f5cff 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(79, 151, 255, 0.08) 0%, transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(31, 92, 255, 0.08) 0%, transparent 55%),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
    pointer-events: none;
    z-index: 1;
    animation: backgroundPulse 14s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 32px;
    width: 100%;
    max-width: 380px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    margin-bottom: 16px;
}

.sales-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow:
        0 12px 24px rgba(37, 99, 235, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.sales-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: rotate(45deg);
    animation: salesShimmer 4s ease-in-out infinite;
}

@keyframes salesShimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.sales-inner {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 6px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sales-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 3px;
}

.sales-inner::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.system-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.6px;
}

.panel-subtitle {
    font-size: 13px;
    color: #2563eb;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #2563eb;
    z-index: 3;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-group:focus-within .input-icon {
    color: #3b82f6;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: rgba(79, 151, 255, 0.1);
    color: #2563eb;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.toggle-password:hover,
.toggle-password:focus {
    background: rgba(79, 151, 255, 0.18);
    outline: none;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.toggle-password .icon-hide {
    display: none;
}

.toggle-password.is-visible .icon-hide {
    display: inline-flex;
}

.toggle-password.is-visible .icon-show {
    display: none;
}

.input-group input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: #1d4ed8;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    background: white;
    transform: translateY(-1px);
}

.input-group input::placeholder {
    color: #93c5fd;
    font-weight: 500;
}

.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #1e3a8a;
    cursor: pointer;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #60a5fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #2563eb;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.signin-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 16px rgba(37, 99, 235, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.signin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.signin-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow:
        0 18px 38px rgba(37, 99, 235, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.signin-btn:hover:not(:disabled)::before {
    left: 100%;
}

.signin-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.signin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #93c5fd, #6b7280);
}

.message-container {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.message-content {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.message-content.success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.message-content.error {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.hidden {
    display: none;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 28px 22px;
        border-radius: 16px;
    }
    
    .system-title {
        font-size: 26px;
    }
    
    .input-group input {
        padding: 14px 44px 14px 44px;
        font-size: 14px;
    }
    
    .signin-btn {
        padding: 14px 22px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 24px 18px;
    }
    
    .system-title {
        font-size: 24px;
    }
    
    .sales-icon {
        width: 55px;
        height: 55px;
    }
    
    .sales-inner {
        width: 22px;
        height: 22px;
    }
    
    .sales-inner::after {
        width: 12px;
        height: 12px;
    }
    
    .sales-inner::before {
        width: 5px;
        height: 5px;
    }
}

input:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.signin-btn:disabled::before {
    display: none;
}

