/* Authentication styles - Mobile-first responsive design */

.auth-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 32px 24px;
    width: 100%;
    box-sizing: border-box;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin: 0 0 8px 0;
    color: #2d3748;
    font-weight: 700;
}

.auth-header p {
    color: #718096;
    margin: 0;
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input,
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.form-input:focus,
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error,
.form-control.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-control.readonly {
    background-color: #f7fafc;
    color: #718096;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-text {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 4px;
    display: block;
}

.password-requirements {
    margin-top: 8px;
    padding: 12px;
    background-color: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.password-requirements .form-text {
    margin-bottom: 6px;
    color: #2d3748;
}

.requirements-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.requirements-list li {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 4px;
    line-height: 1.4;
}

.requirements-list li:before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #667eea;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.form-checkbox {
    width: auto;
    margin: 0;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
    font-weight: normal;
}

.checkbox-label span {
    margin-left: 0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

.error-message {
    margin-top: 4px;
    color: #e53e3e;
    font-size: 0.85rem;
}

.flash-messages {
    margin-top: 16px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.flash-error {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.flash-info {
    background-color: #bee3f8;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

.flash-success {
    background-color: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.default-credentials {
    background-color: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.default-credentials code {
    background-color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    color: #2d3748;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .auth-body {
        padding: 16px;
    }
    
    .auth-card {
        padding: 24px 20px;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .auth-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .auth-header h1 {
        color: #e2e8f0;
    }
    
    .auth-header p {
        color: #a0aec0;
    }
    
    .form-label {
        color: #e2e8f0;
    }
    
    .form-input,
    .form-control {
        background: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-input:focus,
    .form-control:focus {
        border-color: #667eea;
        background: #4a5568;
    }
    
    .form-control.readonly {
        background-color: #2d3748;
        color: #a0aec0;
    }
    
    label {
        color: #e2e8f0;
    }
    
    .form-text {
        color: #a0aec0;
    }
    
    .checkbox-label {
        color: #a0aec0;
    }
    
    .default-credentials {
        background-color: #4a5568;
        color: #a0aec0;
    }
    
    .default-credentials code {
        background-color: #2d3748;
        color: #e2e8f0;
    }
}

/* Utility classes for user management page */
.hidden {
    display: none !important;
}

/* Loading styles for user management */
.loading {
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

/* Tab navigation styles */
.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    color: #4a5568;
    background-color: #f7fafc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

/* User and invitation list styles */
.invitations-list,
.users-list {
    margin-top: 15px;
}

.invitation-item,
.user-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 10px;
    border-left: 4px solid #e2e8f0;
}

.invitation-item:hover,
.user-item:hover {
    background: #edf2f7;
    border-left-color: #667eea;
}

.empty-state,
.error {
    text-align: center;
    padding: 20px;
    color: #718096;
    font-style: italic;
}

.error {
    color: #e53e3e;
    background: #fed7d7;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}