/* Modern Control Panel Login - Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --bg-color: #ffffff;
    --gray-color: #94a3b8;
    --input-bg: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    color: var(--dark-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ip-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(241,245,249, 0.98);
    z-index: 10000;
}
.spinner {
    border: 6px solid #e5e7eb;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 18px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-text {
    font-size: 1.1rem;
    color: var(--dark-color);
    opacity: 0.75;
    letter-spacing: 0.02em;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

.login-container {
    width: 480px;
    background-color: var(--bg-color);
    padding: 40px;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden; /* Contain animations within the container */
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.credibly-logo {
    margin-bottom: 14px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 120px;
    height: auto;
}

/* Network Relay Notification */
.network-relay-notification {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    border-left: 3px solid var(--primary-color);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.network-relay-notification i {
    font-size: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo h1 span {
    font-weight: 400;
    color: var(--primary-color);
}

.subtitle {
    color: var(--gray-color);
    font-size: 14px;
    margin: 0 0 20px 0;
    text-align: center;
    width: 100%;
}

/* Login form */
.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-form h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--dark-color);
}

/* Passkey specific styles */
.passkey-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 360px;
}

.key-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.passkey-message {
    font-size: 18px;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.key-animation {
    width: 100%;
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.usb-port {
    width: 70px;
    height: 30px;
    background-color: #f8fafc;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

/* Form group styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: var(--input-bg);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.remember-me label {
    font-size: 14px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.login-btn {
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.25);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(37, 99, 235, 0.3);
}

.passkey-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: 1.5px solid var(--primary-color);
    border-radius: 6px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative; /* Ensure position context for the animation */
    z-index: 1; /* Control stacking context */
    overflow: hidden; /* Contain the pseudo-element */
    animation: buttonPulse 2s infinite; /* Add back the pulse animation */
}

.passkey-btn .shine {
    position: absolute;
    top: 0;
    left: -60px;
    width: 60px;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.48) 50%, rgba(255,255,255,0) 100%);
    opacity: 1;
    pointer-events: none;
    border-radius: 6px;
    filter: blur(0.5px);
    animation: shine-move 2s linear infinite;
    z-index: 2;
}

@keyframes shine-move {
    0% {
        left: -60px;
        opacity: 0.05;
    }
    10% {
        opacity: 0.12;
    }
    40% {
        opacity: 0.16;
    }
    60% {
        opacity: 0.12;
    }
    100% {
        left: 100%;
        opacity: 0.05;
    }
}
.passkey-btn {
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.passkey-btn > * {
    position: relative;
    z-index: 3;
}

.passkey-btn i {
    font-size: 20px;
}

.passkey-btn:hover {
    background-color: #059669;
    animation-play-state: paused;
}

/* Login footer */
.login-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--gray-color);
    margin-top: 60px;
}

.version {
    background-color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Button pulse animation */
/* removed old shine keyframes */

@keyframes buttonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 10px 5px rgba(59, 130, 246, 0.2);
    }
    
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
}

/* Add a shine effect to the button */
/* .passkey-btn::before removed */
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    animation: shine 2s infinite; /* Add shine animation */
}

@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

/* Side panel */
.side-panel {
    width: 40%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
    overflow: hidden;
    overflow-y: auto;
}

.side-panel .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1597733336794-12d05021d510?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

.side-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.side-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.side-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.9;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature i {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.feature span {
    font-size: 15px;
    font-weight: 500;
    margin-left: 10px;
}

/* Helpdesk Info Styles */
.helpdesk-info {
    margin-top: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    width: 100%;
}

.helpdesk-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.helpdesk-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.helpdesk-info li {
    padding: 5px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Network Status */
.network-status {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 12px 0 32px 0;
    background: none;
    box-shadow: none;
    color: #16a34a;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    z-index: 100;
    pointer-events: none;
}
.network-status i, .network-status span {
    pointer-events: auto;
}

.network-status i {
    font-size: 0.75rem;
}

/* Responsive styles */
@media (max-width: 992px) {
    .container {
        width: 90%;
        height: auto;
        flex-direction: column-reverse;
    }
    
    .side-panel {
        width: 100%;
        padding: 40px 0;
    }
    
    .side-content {
        padding: 30px;
    }
    
    .login-container {
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    
    .login-container, .side-content {
        padding: 20px;
    }
    
    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .forgot-password {
        margin-left: 26px;
    }
}
