/**
 * Shared Auth Page Styles
 * Used by: reset-password.html, accept-invite.html, workspace.html (login)
 */

/* Base reset - only for standalone auth pages */
.auth-page-standalone * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Full page layout - only for standalone auth pages (reset-password, accept-invite) */
.auth-page-standalone {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1000px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Single column layout for pages without features panel */
.auth-container.single-column {
    grid-template-columns: 1fr;
    max-width: 440px;
}

.auth-card {
    background: white;
    padding: 40px;
}

.auth-features {
    background: #f9fafb;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-features h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.auth-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    color: #374151;
    font-weight: 500;
}

.auth-features i {
    color: #667eea;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .auth-features {
        display: none;
    }
}

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

.auth-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6b7280;
    font-size: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.toggle-password:hover {
    color: #6b7280;
}

/* Password Requirements */
.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.requirement i {
    font-size: 6px;
}

.requirement.met {
    color: #10b981;
}

.requirement.met i {
    font-size: 12px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

/* Messages */
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
}

/* Status Containers (for loading/error/success states) */
.status-container {
    text-align: center;
    padding: 40px 20px;
}

.status-container i {
    font-size: 48px;
    margin-bottom: 16px;
}

.status-container.loading i {
    color: #6366f1;
    animation: spin 1s linear infinite;
}

.status-container.error i {
    color: #ef4444;
}

.status-container.success i {
    color: #10b981;
}

.status-container h2 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 8px;
}

.status-container p {
    color: #6b7280;
    font-size: 14px;
}

/* Links */
.btn-link {
    display: inline-block;
    margin-top: 16px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.btn-link:hover {
    text-decoration: underline;
}

.footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #9ca3af;
}

.footer-text a {
    color: #6366f1;
    text-decoration: none;
}

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

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Invite Details Box */
.invite-details {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: #6b7280;
    font-size: 14px;
}

.detail-row .value {
    color: #1f2937;
    font-weight: 500;
    font-size: 14px;
}

/* Utility */
.hidden {
    display: none !important;
}
