/* Auth Styles (Login & Register) */

:root {
    --auth-bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --input-bg: #f8f9fa;
    --input-border: #e2e8f0;
    --input-focus: #667eea;
}

.auth-wrapper {
    position: relative;
    min-height: calc(100vh - 60px); /* Adjust based on header height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: var(--auth-bg-gradient);
}

/* Abstract Background Shapes */
.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -100px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.auth-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: rotate(-5deg);
}

.auth-logo svg {
    width: 32px;
    height: 32px;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-left: 0.25rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--input-bg);
    transition: all 0.2s ease;
    color: var(--text-dark);
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

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

.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Demo Credentials Styles */
.demo-credentials-toggle {
    margin-top: 1.5rem;
    text-align: center;
}

.demo-credentials-toggle button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.demo-credentials-toggle button:hover {
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.05);
}

.demo-credentials-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.demo-credentials {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.demo-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-user:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.demo-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

.demo-icon.admin {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5253 100%);
}

.demo-icon.viewer {
    background: linear-gradient(135deg, #4834d4 0%, #686de0 100%);
}

.demo-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.demo-info strong {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.demo-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.demo-user svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.demo-user:hover svg {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-color);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-logo {
        width: 56px;
        height: 56px;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Message Overrides for Auth Pages */
.auth-card .message {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.auth-card .message.success {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.auth-card .message.error {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}
