/**
 * Schedurica Authentication Styles
 */

/* Container */
.schedurica-auth-container {
    max-width: 420px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.schedurica-auth-container *,
.schedurica-auth-container *::before,
.schedurica-auth-container *::after {
    box-sizing: border-box;
}

/* Card */
.schedurica-auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
}

/* Header */
.schedurica-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.schedurica-auth-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
}

.schedurica-auth-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Tabs */
.schedurica-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin: -2rem -2rem 2rem;
    padding: 0 2rem;
}

.schedurica-auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedurica-auth-tab:hover {
    color: #374151;
}

.schedurica-auth-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.schedurica-auth-tab-content {
    display: none;
}

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

.schedurica-auth-tab-content .schedurica-auth-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

.schedurica-auth-tab-content .schedurica-auth-card {
    box-shadow: none;
    padding: 0;
}

/* Form */
.schedurica-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.schedurica-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.schedurica-form-row {
    display: flex;
    gap: 1rem;
}

.schedurica-form-row > .schedurica-form-group {
    flex: 1;
}

.schedurica-form-row.schedurica-form-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* Inputs */
.schedurica-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.schedurica-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.schedurica-input-error {
    border-color: #ef4444 !important;
}

.schedurica-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Password Field */
.schedurica-password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.schedurica-password-field .schedurica-input {
    padding-right: 3rem;
}

.schedurica-toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedurica-toggle-password:hover {
    color: #374151;
}

/* Password Strength */
.schedurica-password-strength {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.schedurica-password-strength-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease;
}

.schedurica-password-strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.schedurica-password-strength-bar.weak::after {
    background-color: #ef4444;
}

.schedurica-password-strength-bar.medium::after {
    background-color: #f59e0b;
}

.schedurica-password-strength-bar.strong::after {
    background-color: #10b981;
}

.schedurica-password-strength-bar.very-strong::after {
    background-color: #059669;
}

.schedurica-password-strength-text {
    font-size: 0.75rem;
    color: #6b7280;
    min-width: 70px;
}

/* Field Hints & Errors */
.schedurica-field-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

.schedurica-field-error {
    font-size: 0.75rem;
    color: #ef4444;
    min-height: 1rem;
}

/* Checkbox */
.schedurica-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.schedurica-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
    cursor: pointer;
}

/* Links */
.schedurica-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.schedurica-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Alerts */
.schedurica-alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
}

.schedurica-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.schedurica-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Buttons */
.schedurica-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.schedurica-button-primary {
    background: #4f46e5;
    color: #fff;
}

.schedurica-button-primary:hover {
    background: #4338ca;
}

.schedurica-button-primary:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

.schedurica-button-secondary {
    background: #f3f4f6;
    color: #374151;
}

.schedurica-button-secondary:hover {
    background: #e5e7eb;
}

/* Button Loader */
.schedurica-button-loader {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: schedurica-spin 0.8s linear infinite;
}

.schedurica-loading .schedurica-button-text {
    display: none;
}

.schedurica-loading .schedurica-button-loader {
    display: block;
}

@keyframes schedurica-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.schedurica-auth-footer {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Logged In State */
.schedurica-logged-in-state {
    max-width: 420px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.schedurica-logged-in-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    text-align: center;
}

.schedurica-logged-in-card img {
    border-radius: 50%;
    margin-bottom: 1rem;
}

.schedurica-logged-in-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    color: #1f2937;
}

.schedurica-logged-in-info p {
    margin: 0 0 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.schedurica-logged-in-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Account Page */
.schedurica-account-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.schedurica-account-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.schedurica-account-avatar img {
    border-radius: 50%;
    display: block;
}

.schedurica-account-info h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: #1f2937;
}

.schedurica-account-role {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.schedurica-account-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
}

.schedurica-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedurica-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schedurica-stat-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
}

.schedurica-account-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.schedurica-account-card h3 {
    margin: 0 0 1.5rem;
    font-size: 1.125rem;
    color: #1f2937;
}

.schedurica-account-actions {
    display: flex;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .schedurica-form-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .schedurica-account-header {
        flex-direction: column;
        text-align: center;
    }

    .schedurica-account-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .schedurica-account-actions {
        flex-direction: column;
    }
}
