/**
 * CliniCloud Login Styles
 * Clean and modern login interface
 */

:root {
    --primary-color: #0066CC;
    --primary-hover: #0052A3;
    --primary-light: #E6F2FF;
    --accent-color: #00A896;
    --danger-color: #D32F2F;
    --danger-bg: #FFEBEE;
    --text-primary: #1A1A1A;
    --text-secondary: #5A6C7D;
    --border-color: #D1D9E2;
    --bg-light: #F5F7FA;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px 0 rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #E6F2FF 0%, #F5F7FA 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 102, 204, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 168, 150, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(0, 102, 204, 0.02) 50px, rgba(0, 102, 204, 0.02) 51px);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg), 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
    border: 1px solid rgba(0, 102, 204, 0.08);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052CC 100%);
    color: white;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 168, 150, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-header h1 {
    font-size: 2.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 0.9375rem;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
}

.login-form {
    padding: 2.5rem 2rem 2rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
    letter-spacing: 0.01em;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 0.9375rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--bg-white);
    color: var(--text-primary);
    font-weight: 400;
}

.form-input:hover {
    border-color: rgba(0, 102, 204, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.08);
    background: white;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--danger-bg);
    color: var(--danger-color);
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.error-message svg {
    flex-shrink: 0;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
}

.btn-login:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.2);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

.login-footer {
    padding: 1.75rem 2rem;
    background: var(--bg-light);
    text-align: center;
    border-top: 1px solid rgba(0, 102, 204, 0.08);
}

.login-footer p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Responsive design */
@media (max-width: 480px) {
    body::before {
        opacity: 0.5;
    }

    .login-header {
        padding: 2.5rem 1.5rem 2rem;
    }

    .login-header h1 {
        font-size: 1.875rem;
    }

    .logo {
        width: 70px;
        height: 70px;
    }

    .logo svg {
        width: 42px;
        height: 42px;
    }

    .login-form {
        padding: 2rem 1.5rem 1.5rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }
}

/* Accessibility */
.form-input:focus-visible,
.btn-login:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later if needed */
}

