/* Persian Authentication Styles */
/* Import local Vazirmatn fonts */
@import url('../fonts/fonts.css');

/* RTL Direction and Persian Font */
body {
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Override default Blazor styles for authentication pages */
.login-container,
.register-container,
.home-container,
.dashboard-container {
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

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

/* Register Container */
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.register-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.register-header h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

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

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

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

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

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: none;
    padding: 12px 15px;
    color: #6c757d;
    border-radius: 0 8px 8px 0;
    min-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-control {
    border: 1px solid #dee2e6;
    border-right: none;
    padding: 12px 15px;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

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

.form-control::placeholder {
    color: #adb5bd;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-outline-secondary {
    background: white;
    border: 1px solid #dee2e6;
    color: #6c757d;
    border-radius: 0 8px 8px 0;
    padding: 12px 15px;
    min-width: 45px;
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
    color: #495057;
}

.btn-login, .btn-register {
    width: 100%;
    margin-top: 10px;
    font-size: 1.1rem;
    padding: 15px;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert i {
    font-size: 1.1rem;
}

/* Footer Styles */
.login-footer, .register-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p, .register-footer p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.login-footer a, .register-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

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

/* Validation Messages */
.validation-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card, .register-card {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .login-header h1, .register-header h1 {
        font-size: 1.5rem;
    }
    
    .btn-login, .btn-register {
        font-size: 1rem;
        padding: 12px;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Row and Column Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 10px;
    padding-left: 10px;
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Form Text */
.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    direction: rtl;
}

/* Input Text Area */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
    direction: rtl;
}

/* Select Input */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: left 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-left: 2.5rem;
    appearance: none;
    direction: rtl;
}

/* Focus States */
.form-control:focus + .input-group-text {
    border-color: #667eea;
}

/* Animation for cards */
.login-card, .register-card {
    animation: slideInUp 0.6s ease-out;
}

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

/* Home Page Styles */
.home-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.welcome-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    animation: slideInUp 0.6s ease-out;
}

.welcome-card h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.welcome-card p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.user-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: right;
}

.user-info p {
    margin: 10px 0;
    color: #333;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.redirect-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 20px;
    direction: rtl;
}

.dashboard-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-welcome h1 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-welcome p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.dashboard-content {
    margin-top: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 20px;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.dashboard-card h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dashboard-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.dashboard-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
}

/* Debug Component Styles */
.debug-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    direction: rtl;
}

.debug-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.debug-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.debug-section h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.debug-section p {
    color: #666;
    margin: 8px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .user-welcome h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-card {
        margin-bottom: 15px;
    }
}

/* Override default Blazor styles for authentication pages */
.login-container .page,
.register-container .page,
.home-container .page,
.dashboard-container .page {
    display: none;
}

.login-container .sidebar,
.register-container .sidebar,
.home-container .sidebar {
    display: none;
}

.login-container .top-row,
.register-container .top-row,
.home-container .top-row {
    display: none;
}

/* Ensure authentication pages take full screen */
.login-container,
.register-container,
.home-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

/* Profile Page Styles */
.profile-container {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 20px;
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.profile-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.profile-avatar i {
    font-size: 2rem;
    color: white;
}

.profile-info h1 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.user-email {
    color: #666;
    font-size: 1rem;
    margin: 0 0 10px 0;
}

.role-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.profile-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.profile-section {
    margin-bottom: 40px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.profile-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Info Grid for Display Mode */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.info-label i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.info-value {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.role-badge-inline {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Profile Actions Section */
.profile-actions-section {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.profile-actions-section .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Design for Profile */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info h1 {
        font-size: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-actions-section {
        flex-direction: column;
    }
    
    .profile-actions-section .btn {
        width: 100%;
    }
}

/* Form Styles for Edit Mode */
.profile-content .form-group {
    margin-bottom: 20px;
}

.profile-content .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

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

.profile-content .input-group-text {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: none;
    padding: 12px 15px;
    color: #6c757d;
    border-radius: 0 8px 8px 0;
    min-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-content .form-control {
    border: 1px solid #dee2e6;
    border-right: none;
    padding: 12px 15px;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

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

.profile-content .form-control::placeholder {
    color: #adb5bd;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

.profile-content .btn-outline-secondary {
    background: white;
    border: 1px solid #dee2e6;
    color: #6c757d;
    border-radius: 0 8px 8px 0;
    padding: 12px 15px;
    min-width: 45px;
}

.profile-content .btn-outline-secondary:hover {
    background: #f8f9fa;
    color: #495057;
}

.profile-content .form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    direction: rtl;
}

.profile-content textarea.form-control {
    resize: vertical;
    min-height: 80px;
    direction: rtl;
}

.profile-content .form-control:focus + .input-group-text {
    border-color: #667eea;
}

/* Animation for profile sections */
.profile-section {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Loading states */
.profile-content .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Alert styles for profile page */
.profile-container .alert {
    margin-bottom: 20px;
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
}

.profile-container .alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.profile-container .alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.profile-container .alert i {
    font-size: 1.1rem;
} 