/**
 * Medical Management System - Main Styles
 * File: assets/css/main.css
 */

/* Reset and Base Styles */
.mms-login-container *,
.mms-dashboard * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* RTL Support */
.mms-login-container,
.mms-dashboard {
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Login Container */
.mms-login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.mms-patient-login {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Login Box */
.mms-login-box {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.mms-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mms-logo {
    margin: 0 auto 1.5rem;
    width: 60px;
    height: 60px;
}

.mms-login-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.mms-login-header p {
    color: #6B7280;
    font-size: 0.875rem;
}

/* Tabs */
.mms-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #F3F4F6;
    border-radius: 12px;
    padding: 0.25rem;
}

.mms-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mms-tab.active {
    background: white;
    color: #4F46E5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mms-patient-login .mms-tab.active {
    color: #10B981;
}

/* Forms */
.mms-form {
    display: none;
}

.mms-form.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mms-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mms-form-group {
    margin-bottom: 1.5rem;
}

.mms-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.mms-form-group input[type="text"],
.mms-form-group input[type="email"],
.mms-form-group input[type="password"],
.mms-form-group input[type="tel"],
.mms-form-group textarea,
.mms-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.mms-form-group input:focus,
.mms-form-group textarea:focus,
.mms-form-group select:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mms-patient-login .mms-form-group input:focus,
.mms-patient-login .mms-form-group textarea:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.mms-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox */
.mms-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #6B7280;
}

.mms-checkbox input[type="checkbox"] {
    margin-left: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.mms-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mms-btn-primary {
    background: #4F46E5;
    color: white;
}

.mms-btn-primary:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.mms-btn-success {
    background: #10B981;
    color: white;
}

.mms-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.mms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Footer */
.mms-form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.mms-form-footer a {
    color: #4F46E5;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.mms-patient-login .mms-form-footer a {
    color: #10B981;
}

.mms-form-footer a:hover {
    text-decoration: underline;
}

/* Switch Link */
.mms-switch-link {
    margin-top: 2rem;
    text-align: center;
}

.mms-switch-link p {
    color: white;
    font-size: 0.875rem;
}

.mms-switch-link a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
}

/* Message */
.mms-message {
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.mms-message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.mms-message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* Loading Spinner */
.mms-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .mms-login-box {
        padding: 2rem;
    }
    
    .mms-form-row {
        grid-template-columns: 1fr;
    }
    
    .mms-login-header h2 {
        font-size: 1.5rem;
    }
}