﻿/* Professional Tamkeen Arabic Styles - Green Background with Orange Buttons & Icons */

:root {
    --primary-color: #006649;
    --primary-dark: #004d36;
    --primary-light: #00805c;
    --accent-color: #F99D1C;
    --accent-dark: #e6890d;
    --accent-light: #fbb040;
    --secondary-color: #6c757d;
    --success-color: #006649;
    --danger-color: #dc3545;
    --warning-color: #F99D1C;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #006649 0%, #00805c 100%);
    --gradient-accent: linear-gradient(135deg, #F99D1C 0%, #fbb040 100%);
    --gradient-light: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --shadow-sm: 0 2px 4px rgba(0, 102, 73, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 102, 73, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 102, 73, 0.15);
    --shadow-accent-sm: 0 2px 4px rgba(249, 157, 28, 0.1);
    --shadow-accent-md: 0 4px 8px rgba(249, 157, 28, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
   color: var(--dark-color);
    background: linear-gradient(135deg, #f8f9fa 0%, rgba(0, 102, 73, 0.05) 100%);
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
}

/* Login Body - خلفية بيضاء للوجين */
.login-body {
    background: #ffffff !important; /* خلفية بيضاء بالكامل */
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner .spinner-border {
    color: var(--primary-color) !important;
}

.loading-spinner.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Top Header - Green background */
.top-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1040;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-start;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: white;
    padding: 5px;
}

.brand-text .brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
}

.brand-text .brand-subtitle {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Icons in orange */
.user-info i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.current-time {
    font-size: 0.85rem;
    font-weight: 300;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    min-width: 120px;
}

/* Orange clock icon */
.current-time i {
    color: var(--accent-color);
}

/* Navigation - Green background */
.main-navigation {
    background: white;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 98px;
    z-index: 1030;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    border: 2px solid transparent;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-dark);
}

/* Orange icons in navigation */
.nav-item .nav-link i {
    color: var(--accent-color);
}

.nav-item .nav-link:hover i,
.nav-item .nav-link.active i {
    color: var(--accent-color);
}

.nav-item .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    border-top: 3px solid var(--primary-color);
    text-align: right;
}

.nav-item .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    text-align: right;
}

.nav-item .dropdown-item:hover {
    background: rgba(0, 102, 73, 0.1);
    color: var(--primary-color);
}

/* Orange icons in dropdown */
.nav-item .dropdown-item i {
    color: var(--accent-color);
}

/* Breadcrumb - Light green background */
.breadcrumb-section {
    background: linear-gradient(135deg, rgba(0, 102, 73, 0.05) 0%, rgba(0, 102, 73, 0.02) 100%);
    border-bottom: 1px solid rgba(0, 102, 73, 0.2);
    padding: 0.75rem 0;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

/* Orange icons in breadcrumb */
.breadcrumb-item i {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

/* Cards - Green theme */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    background: white;
    border-top: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
}

/* Orange icons in card headers */
.card-header i {
    color: var(--accent-color);
}

.card-body {
    padding: 2rem;
    background: white;
}

/* Forms - Green borders */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Orange icons in form labels */
.form-label i {
    color: var(--accent-color);
}

.form-control, .form-select {
    border: 2px solid rgba(0, 102, 73, 0.2);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
    text-align: right;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 73, 0.25);
    outline: none;
    background: white;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

/* Buttons - Orange buttons! */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
    text-transform: none;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

/* Primary buttons are orange */
.btn-primary {
    background: var(--gradient-accent);
    border-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent-md);
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
}

.btn-success {
    background: var(--gradient-accent);
    border-color: var(--accent-color);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent-md);
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
}

.btn-warning {
    background: var(--gradient-accent);
    border-color: var(--accent-color);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent-md);
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    border-color: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: var(--gradient-light);
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-outline-primary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: white;
}

.btn-outline-primary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: white;
}

.btn-outline-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

/* Orange icons in buttons */
.btn i {
    color: inherit;
}

/* Tables - Green theme */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 102, 73, 0.1);
}

.table thead {
    background: linear-gradient(135deg, rgba(0, 102, 73, 0.1) 0%, rgba(0, 102, 73, 0.05) 100%);
}

.table th {
    font-weight: 600;
    color: var(--primary-dark);
    border: none;
    padding: 1rem;
    border-bottom: 2px solid var(--primary-color);
    text-align: right;
}

/* Orange icons in table headers */
.table th i {
    color: var(--accent-color);
}

.table td {
    padding: 1rem;
    border-top: 1px solid rgba(0, 102, 73, 0.1);
    vertical-align: middle;
    text-align: right;
}

.table-hover tbody tr:hover {
    background: rgba(0, 102, 73, 0.05);
    transform: scale(1.01);
    transition: var(--transition);
}

/* Badges - Green with orange accents */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
}

.bg-primary,
.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-warning,
.badge.bg-warning {
    background: var(--gradient-accent) !important;
    color: white !important;
}

.bg-success,
.badge.bg-success {
    background: var(--gradient-primary) !important;
}

/* Orange icons in badges */
.badge i {
    color: var(--accent-color);
}

/* Alerts - Green theme */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: right;
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 102, 73, 0.1) 0%, rgba(0, 102, 73, 0.05) 100%);
    color: var(--success-color);
    border-right: 4px solid var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(249, 157, 28, 0.1) 0%, rgba(249, 157, 28, 0.05) 100%);
    color: var(--accent-dark);
    border-right: 4px solid var(--accent-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: var(--danger-color);
    border-right: 4px solid var(--danger-color);
}

/* Orange icons in alerts */
.alert i {
    color: var(--accent-color);
}

/* Footer - Green background */
.main-footer {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.main-footer a {
    color: white;
    text-decoration: none;
}

.main-footer a:hover {
    color: var(--accent-color);
}

/* Form sections - Green background */
.form-section {
    background: linear-gradient(135deg, rgba(0, 102, 73, 0.05) 0%, rgba(0, 102, 73, 0.02) 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-right: 4px solid var(--primary-color);
    border: 1px solid rgba(0, 102, 73, 0.2);
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Orange icons in section titles */
.section-title i {
    color: var(--accent-color);
}

.section-divider {
    margin: 1rem 0 1.5rem 0;
    border-color: var(--primary-color);
    opacity: 0.3;
}

.form-actions {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
    border: 1px solid rgba(0, 102, 73, 0.1);
    border-top: 3px solid var(--primary-color);
}

.action-buttons .btn {
    min-width: 120px;
}

.input-group-text {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

/* Orange icons in input groups */
.input-group-text i {
    color: var(--accent-color);
}

/* Page header - Green background */
.page-header {
    background: linear-gradient(135deg, rgba(0, 102, 73, 0.08) 0%, rgba(0, 102, 73, 0.05) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 102, 73, 0.2);
    margin-bottom: 2rem;
    border-top: 4px solid var(--primary-color);
}

.page-header h1 {
    color: var(--primary-color);
}

/* Orange icons in page header */
.page-header i {
    color: var(--accent-color);
}

.page-header .badge {
    background: var(--gradient-accent) !important;
}

/* Search and filter bar - Green theme */
.search-filter-bar .card {
    border: 1px solid rgba(0, 102, 73, 0.2);
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary-color);
}

/* Orange icons in search */
.search-filter-bar i {
    color: var(--accent-color);
}

/* Terms Modal Styles */
.modal-lg {
    max-width: 800px;
}

.modal-header-primary {
    background: var(--gradient-primary) !important;
}

.btn-close-white {
    filter: invert(1);
}

.terms-content {
    line-height: 1.6;
    color: #333;
}

.terms-header h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.terms-section {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    background: rgba(0, 102, 73, 0.02);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.terms-section .section-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.terms-list {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.terms-list li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.agreement-section {
    border: 2px solid var(--primary-color);
    background: rgba(0, 102, 73, 0.1);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.95rem;
    color: #333;
}

/* Scrollbar styling for modal */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ASP.NET Core Validation Styles */
.input-validation-error, .is-invalid {
    border-color: var(--danger-color) !important;
}

.field-validation-error {
    color: var(--danger-color);
    font-size: 0.875rem;
}

.validation-summary-errors {
    color: var(--danger-color);
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.validation-summary-errors ul li {
    margin-bottom: 0.25rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Custom Scrollbar - Green */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Login Specific Styles - الخلفية البيضاء الكاملة مع كارد أبيض */

/* كارد اللوجين أبيض مع حدود خفيفة */
.login-card {
    background: white !important; 
    border: 2px solid rgba(0, 102, 73, 0.2) !important; /* حدود خضراء خفيفة */
    box-shadow: 0 10px 40px rgba(0, 102, 73, 0.1) !important;
    transition: all 0.6s ease;
    border-radius: 15px !important;
}

.login-card:hover {
    box-shadow: 0 15px 50px rgba(0, 102, 73, 0.15) !important;
    border-color: rgba(0, 102, 73, 0.3) !important;
    transform: translateY(-2px);
}

 
.login-card .card-body {
    padding: 3rem !important;
}

/* الأزرار برتقالية */
.login-card .btn-primary,
.login-card .btn-login {
    background: var(--gradient-accent) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(249, 157, 28, 0.3);
    transition: all 0.3s ease;
}

.login-card .btn-primary:hover,
.login-card .btn-login:hover {
    background: var(--accent-dark) !important;
    border-color: var(--accent-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 157, 28, 0.4);
}

/* الأيقونات برتقالية */
.login-card .input-icon,
.login-card .fas {
    color: var(--accent-color) !important;
}

.login-card .password-toggle {
    color: var(--accent-color) !important;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.login-card .password-toggle:hover {
    background: rgba(249, 157, 28, 0.1) !important;
    color: var(--accent-color) !important;
}

/* شعار اللوجو مع حدود خضراء */
.login-logo {
    border: 3px solid var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0, 102, 73, 0.2) !important;
}

/* Login Enhancements - تحسين شاشة اللوجين */
.login-container {
    /*    background: linear-gradient(135deg, #1a365d 0%, #2d5a7b 30%, var(--accent-color) 70%, #fbb040 100%) !important;

*/
    /*background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, #fbb040 100%) !important;*/
    background: #006649 !important;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    padding: 2rem;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}



/* كارد اللوجين - محسن */
.login-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(0, 102, 73, 0.2) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(20px);
    z-index: 2;
    position: relative;
    width: 400px;
    max-width: 90%;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(0, 102, 73, 0.4) !important;
}

.login-card .card-body {
    padding: 3rem !important;
}

/* شعار التطبيق */
.login-logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 102, 73, 0.2);
    border: 3px solid var(--primary-color);
    margin: 0 auto;
    margin-bottom: 1rem;
}

.login-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* حقول الإدخال محسنة */
.login-card .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.login-card .form-control {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(249, 157, 28, 0.15);
    transform: translateY(-1px);
}

/* أيقونات الحقول */
.login-card .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1.1rem;
    z-index: 3;
}

.login-card .form-control.has-icon {
    padding-left: 3rem;
}

/* زر إظهار/إخفاء كلمة المرور - على الشمال */
.login-card .password-toggle-left {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--accent-color) !important;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.login-card .password-toggle-left:hover {
    background: rgba(249, 157, 28, 0.1) !important;
    color: var(--accent-color) !important;
}

/* زر تسجيل الدخول - مميز */
.login-card .btn-login,
.login-card .btn-primary {
    background: var(--gradient-accent) !important;
    border: none !important;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: white !important;
    width: 100%;
    box-shadow: 0 8px 25px rgba(249, 157, 28, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-card .btn-login::before,
.login-card .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-card .btn-login:hover::before,
.login-card .btn-primary:hover::before {
    left: 100%;
}

.login-card .btn-login:hover,
.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(249, 157, 28, 0.4);
    background: var(--accent-dark) !important;
}

/* Responsive للموبايل */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        padding: 1rem;
        text-align: center;
    }
    
    .login-brand-section {
        padding: 0;
        margin-bottom: 2rem;
    }
    
    .login-brand-title {
        font-size: 2.5rem;
    }
    
    .login-card {
        width: 100%;
        max-width: 400px;
    }
}

 

.login-card {
    background: white !important;
    border: 2px solid var(--primary-color) !important; /* حدود خضراء */
    border-radius: 15px !important;
    box-shadow: 0 4px 15px rgba(0, 102, 73, 0.1) !important;
    width: 700px;
    max-width: 100%;
}

.login-card .card-body {
    padding: 2.5rem !important;
}

/* الأزرار برتقالية */
.login-card .btn-primary {
    background: var(--gradient-accent) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
}

.login-card .btn-primary:hover {
    background: var(--accent-dark) !important;
    border-color: var(--accent-dark) !important;
}

/* الأيقونات برتقالية */
.login-card .fas,
.login-card i {
    color: var(--accent-color) !important;
}

/* شعار بحدود خضراء */
.login-logo {
    border: 2px solid var(--primary-color) !important;
}
.table-scroll {
    max-height: 500px; 
    overflow-y: auto;
    overflow-x: auto;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================ */

/* Extra Small Devices (320px - 575px) */
@media (max-width: 575.98px) {
    /* Header Responsive */
    .top-header {
        padding: 0.75rem 0;
    }

    .header-brand {
        gap: 0.5rem;
    }

    .logo {
        width: 40px;
        height: 40px;
        padding: 3px;
    }

    .brand-text .brand-title {
        font-size: 1.2rem;
    }

    .brand-text .brand-subtitle {
        font-size: 0.75rem;
    }

    .header-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .current-time {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        min-width: 90px;
    }

    .user-dropdown-btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }

    .user-dropdown-btn .user-name {
        display: none;
    }

    /* Navigation Responsive */
    .main-navigation {
        top: 70px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-item .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Cards Responsive */
    .card {
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Forms Responsive */
    .form-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control, .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Buttons Responsive */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Tables Responsive */
    .table-responsive {
        margin-bottom: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table th, .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    /* Footer Responsive */
    .main-footer {
        padding: 1.5rem 0;
        text-align: center;
    }

    .main-footer .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    /* Page Header Responsive */
    .page-header {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Modal Responsive */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Breadcrumb Responsive */
    .breadcrumb {
        font-size: 0.8rem;
    }

    /* Container Responsive */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Main Content Responsive */
    .main-content {
        padding: 1rem 0;
    }

    /* Action Buttons Responsive */
    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Search Filter Bar Responsive */
    .search-filter-bar .row {
        margin: 0;
    }

    .search-filter-bar .col-md-6,
    .search-filter-bar .col-md-4,
    .search-filter-bar .col-md-3 {
        padding: 0.25rem;
    }

    /* Dropdown Menu Responsive */
    .dropdown-menu {
        min-width: 250px;
        font-size: 0.9rem;
    }

    /* Badge Responsive */
    .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    /* Alert Responsive */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Small Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .header-brand {
        gap: 0.75rem;
    }

    .logo {
        width: 45px;
        height: 45px;
    }

    .brand-text .brand-title {
        font-size: 1.4rem;
    }

    .user-dropdown-btn .user-name {
        display: inline;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .card-body {
        padding: 1.5rem;
    }

    .form-section {
        padding: 1.25rem;
    }

    .table th, .table td {
        padding: 0.75rem;
    }
}

/* Medium Devices - Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .top-header {
        padding: 0.875rem 0;
    }

    .logo {
        width: 48px;
        height: 48px;
    }

    .brand-text .brand-title {
        font-size: 1.6rem;
    }

    .header-actions {
        gap: 1rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-item .nav-link {
        padding: 0.625rem 1.25rem;
        font-size: 0.95rem;
    }

    .card-header {
        padding: 1.25rem;
    }

    .card-body {
        padding: 1.75rem;
    }

    .btn {
        padding: 0.625rem 1.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .table {
        font-size: 0.9rem;
    }
}

/* Large Devices - Desktops (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container-fluid {
        max-width: 960px;
    }

    .card-body {
        padding: 1.875rem;
    }

    .nav-item .nav-link {
        padding: 0.75rem 1.375rem;
    }
}

/* Extra Large Devices - Large Desktops (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .container-fluid {
        max-width: 1140px;
    }
}

/* Extra Extra Large Devices - Very Large Monitors (1400px+) */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
    }

    .brand-text .brand-title {
        font-size: 1.9rem;
    }

    .card-body {
        padding: 2.25rem;
    }

    .page-header h1 {
        font-size: 2.25rem;
    }
}

/* Ultra Wide Monitors (1920px+) */
@media (min-width: 1920px) {
    .container-fluid {
        max-width: 1600px;
    }

    .brand-text .brand-title {
        font-size: 2rem;
    }

    .card-body {
        padding: 2.5rem;
    }

    .table th, .table td {
        padding: 1.125rem;
    }
}

/* ============================================
   FORM RESPONSIVE RULES - ALL BREAKPOINTS
   ============================================ */

/* Mobile Forms (320px - 575px) */
@media (max-width: 575.98px) {
    /* Form Groups */
    .row .col-md-6,
    .row .col-md-4,
    .row .col-md-3 {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    /* Input Groups */
    .input-group {
        flex-wrap: nowrap;
    }

    .input-group-text {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Dropdown Search Container */
    .dropdown-search-container {
        margin-bottom: 0.75rem;
    }

    .dropdown-search {
        font-size: 0.9rem;
        padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    }

    .dropdown-search-results {
        max-height: 200px;
        font-size: 0.9rem;
    }

    .search-result-item {
        padding: 0.5rem 0.75rem;
    }

    /* Form Check (Checkboxes/Radio) */
    .form-check {
        padding-left: 0;
        padding-right: 1.75rem;
    }

    .form-check-input {
        margin-right: -1.75rem;
        margin-left: 0;
    }

    .form-check-label {
        font-size: 0.9rem;
    }

    /* Form Actions */
    .form-actions {
        padding: 1rem;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-buttons .btn {
        width: 100%;
        min-width: auto;
    }

    /* Validation Messages */
    .field-validation-error,
    .text-danger.small {
        font-size: 0.8rem;
    }

    /* Form Select with Icons */
    .form-select {
        padding-right: 2.5rem;
    }

    /* Terms and Conditions */
    .terms-section {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .terms-list li {
        font-size: 0.8rem;
    }

    /* Multi-step Forms */
    .stepper-wrapper {
        overflow-x: auto;
    }

    .stepper-item {
        min-width: 80px;
        font-size: 0.75rem;
    }
}

/* Small Tablets (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .row .col-md-6 {
        width: 100%;
    }

    .row .col-md-4,
    .row .col-md-3 {
        width: 50%;
    }

    .form-actions {
        padding: 1.25rem;
    }

    .action-buttons {
        flex-direction: row;
        justify-content: space-between;
    }

    .action-buttons .btn {
        width: auto;
        min-width: 140px;
    }
}

/* Medium Devices - Forms (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .row .col-md-6 {
        width: 50%;
    }

    .row .col-md-4 {
        width: 50%;
    }

    .row .col-md-3 {
        width: 33.333%;
    }

    .form-section {
        padding: 1.375rem;
    }

    .input-group-text {
        padding: 0.75rem 1rem;
    }

    .form-actions {
        padding: 1.375rem;
    }
}

/* ============================================
   TABLE RESPONSIVE RULES - ALL BREAKPOINTS
   ============================================ */

/* Base Table Responsive Wrapper */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Tables (320px - 575px) */
@media (max-width: 575.98px) {
    /* Table Container */
    .table-responsive {
        border: 1px solid rgba(0, 102, 73, 0.1);
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }

    .table {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 102, 73, 0.2);
        border-radius: var(--border-radius);
        padding: 0.75rem;
    }

    .table tbody td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        position: relative;
        padding-right: 50%;
    }

    .table tbody td::before {
        content: attr(data-label);
        position: absolute;
        right: 0;
        width: 45%;
        padding-left: 0.5rem;
        font-weight: 600;
        color: var(--primary-color);
    }

    .table tbody td:last-child {
        border-bottom: 0;
    }

    /* Table Actions */
    .table .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        margin: 0.25rem 0;
        display: inline-block;
        width: auto;
    }

    .table .btn-group {
        flex-direction: row;
        gap: 0.25rem;
    }

    /* Table Scroll Wrapper */
    .table-scroll {
        max-height: 400px;
    }

    /* Pagination in Tables */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-item {
        margin: 0.125rem;
    }

    .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
}

/* Small Devices - Tables (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .table {
        font-size: 0.85rem;
    }

    .table thead {
        display: table-header-group;
    }

    .table tbody tr {
        display: table-row;
        border: none;
        padding: 0;
    }

    .table tbody td {
        display: table-cell;
        padding: 0.625rem;
    }

    .table tbody td::before {
        content: none;
    }

    .table th {
        font-size: 0.85rem;
        padding: 0.625rem;
    }

    .table .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Medium Devices - Tables (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .table {
        font-size: 0.9rem;
    }

    .table th, .table td {
        padding: 0.875rem;
    }

    .table .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* Ensure tables never break layout */
.table-responsive {
    min-height: 0.01%;
}

/* Table with fixed header for long scrolling */
.table-scroll thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

/* Striped Table Responsive Colors */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 102, 73, 0.03);
}

/* Hover effect for responsive tables */
@media (min-width: 576px) {
    .table-hover tbody tr:hover {
        background-color: rgba(0, 102, 73, 0.06);
    }
}

/* ============================================
   CARDS, MODALS & DIALOGS RESPONSIVE RULES
   ============================================ */

/* Mobile Cards (320px - 575px) */
@media (max-width: 575.98px) {
    /* Card Structure */
    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 0.875rem;
        font-size: 0.95rem;
        flex-direction: column;
        align-items: flex-start !important;
    }

    .card-header .d-flex {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .card-header .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .card-body {
        padding: 1rem;
    }

    .card-footer {
        padding: 0.875rem;
    }

    /* Card Grid Layouts */
    .row .col-lg-4,
    .row .col-lg-6,
    .row .col-lg-3 {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Modal Responsive */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-header .modal-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .modal-header .btn-close {
        position: absolute;
        top: 1rem;
        left: 1rem;
    }

    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    /* Modal Large/Extra Large */
    .modal-lg,
    .modal-xl {
        max-width: calc(100% - 1rem);
    }

    /* Dialog Scrollable */
    .modal-dialog-scrollable {
        max-height: calc(100vh - 1rem);
    }

    .modal-dialog-scrollable .modal-body {
        max-height: calc(100vh - 180px);
    }

    /* Offcanvas (Side Drawer) */
    .offcanvas {
        max-width: 85%;
    }

    .offcanvas-header {
        padding: 1rem;
    }

    .offcanvas-body {
        padding: 1rem;
    }

    /* Accordion in Modal */
    .modal-body .accordion-button {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .modal-body .accordion-body {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }

    /* Terms Modal Specific */
    .terms-content {
        font-size: 0.85rem;
    }

    .terms-header h4 {
        font-size: 1rem;
    }

    /* Settings Modal */
    #settingsModal .modal-body,
    #helpModal .modal-body {
        padding: 1rem;
    }
}

/* Small Tablets - Cards & Modals (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .modal-dialog {
        margin: 1rem auto;
        max-width: 500px;
    }

    .modal-lg {
        max-width: 540px;
    }

    .card-header {
        padding: 1.125rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .row .col-lg-6 {
        width: 100%;
    }

    .row .col-lg-4,
    .row .col-lg-3 {
        width: 50%;
    }

    .modal-footer {
        flex-direction: row;
        justify-content: flex-end;
    }

    .modal-footer .btn {
        width: auto;
        min-width: 100px;
    }
}

/* Medium Devices - Cards & Modals (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .modal-dialog {
        max-width: 600px;
    }

    .modal-lg {
        max-width: 700px;
    }

    .modal-xl {
        max-width: 750px;
    }

    .card-header {
        padding: 1.25rem;
        flex-direction: row;
    }

    .card-body {
        padding: 1.75rem;
    }

    .row .col-lg-4 {
        width: 50%;
    }

    .row .col-lg-6 {
        width: 50%;
    }

    .row .col-lg-3 {
        width: 33.333%;
    }
}

/* Large Devices (992px+) - Default styles apply */
@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }

    .modal-xl {
        max-width: 1140px;
    }
}

/* ============================================
   BUTTONS & TOUCH TARGETS RESPONSIVE RULES
   ============================================ */

/* Mobile Buttons (320px - 575px) */
@media (max-width: 575.98px) {
    /* Base Button Sizing */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px; /* Apple/Google touch target recommendation */
        border-radius: 8px;
    }

    /* Button Groups */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-group .btn {
        width: 100%;
        border-radius: 8px !important;
    }

    .btn-group-vertical .btn {
        width: 100%;
    }

    /* Button Toolbar */
    .btn-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-toolbar .btn-group {
        width: 100%;
    }

    /* Icon Buttons */
    .btn i {
        font-size: 1rem;
    }

    .btn-icon-only {
        padding: 0.625rem;
        min-width: 44px;
        min-height: 44px;
    }

    /* Button Sizes */
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }

    /* Split Buttons */
    .dropdown-toggle-split {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Floating Action Button */
    .btn-floating {
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    /* Button with Icon and Text */
    .btn .me-2,
    .btn .ms-2 {
        margin-left: 0.375rem !important;
        margin-right: 0.375rem !important;
    }

    /* Action Buttons in Cards */
    .card-header .btn,
    .card-footer .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Pagination Buttons */
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-item .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Dropdown Toggle Buttons */
    .dropdown-toggle {
        min-height: 44px;
    }

    /* Close Buttons */
    .btn-close {
        padding: 0.75rem;
        font-size: 1rem;
        min-width: 44px;
        min-height: 44px;
    }

    /* Button Links */
    .btn-link {
        padding: 0.5rem 0.75rem;
        min-height: 40px;
    }

    /* Button Groups in Forms */
    .form-actions .btn-group {
        width: 100%;
    }

    .form-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Search/Submit Buttons in Input Groups */
    .input-group .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Small Tablets - Buttons (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }

    .btn-group {
        flex-direction: row;
        width: auto;
    }

    .btn-group .btn {
        width: auto;
        border-radius: 0;
    }

    .btn-group .btn:first-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .btn-group .btn:last-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .form-actions .btn {
        width: auto;
        margin-bottom: 0;
        min-width: 120px;
    }

    .btn-floating {
        bottom: 1.5rem;
        left: 1.5rem;
    }
}

/* Medium Devices - Buttons (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .btn {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
    }

    .btn-sm {
        padding: 0.5rem 1.25rem;
    }

    .btn-lg {
        padding: 0.875rem 2rem;
    }

    .page-item .page-link {
        padding: 0.625rem 0.875rem;
    }
}

/* Touch Target Improvements for All Devices */
@media (max-width: 991.98px) {
    /* Ensure all interactive elements meet minimum touch target */
    .btn,
    .page-link,
    .nav-link,
    .dropdown-item,
    .form-check-input,
    .form-control,
    .form-select,
    a {
        min-height: 40px;
    }

    /* Increase spacing between clickable elements */
    .nav-item + .nav-item,
    .btn + .btn {
        margin-top: 0.25rem;
    }

    /* Better touch feedback */
    .btn:active,
    .nav-link:active,
    .page-link:active {
        transform: scale(0.98);
    }
}

/* ============================================
   FOOTER & PAGE LAYOUT RESPONSIVE RULES
   ============================================ */

/* Mobile Footer & Layout (320px - 575px) */
@media (max-width: 575.98px) {
    /* Body and Main Layout */
    body {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Main Content Area */
    .main-content {
        min-height: calc(100vh - 220px);
        padding: 1rem 0;
    }

    /* Footer */
    .main-footer {
        padding: 1.5rem 0;
        font-size: 0.85rem;
    }

    .main-footer .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .main-footer p {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .main-footer a {
        font-size: 0.8rem;
        display: block;
        margin-top: 0.5rem;
    }

    /* Page Header */
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .page-header .badge {
        font-size: 0.75rem;
        margin-top: 0.5rem;
        display: inline-block;
    }

    /* Breadcrumb Section */
    .breadcrumb-section {
        padding: 0.5rem 0;
    }

    .breadcrumb {
        font-size: 0.8rem;
        margin: 0;
        flex-wrap: wrap;
    }

    .breadcrumb-item {
        font-size: 0.8rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    /* Container Spacing */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Row Spacing */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Section Spacing */
    section {
        padding: 1.5rem 0;
    }

    /* Dividers */
    hr {
        margin: 1rem 0;
    }

    /* Search Filter Bar */
    .search-filter-bar {
        margin-bottom: 1rem;
    }

    .search-filter-bar .card-body {
        padding: 1rem;
    }

    /* Stats/Dashboard Cards */
    .stats-card {
        margin-bottom: 1rem;
    }

    .stats-card .card-body {
        padding: 1rem;
    }

    .stats-card h3 {
        font-size: 1.5rem;
    }

    .stats-card p {
        font-size: 0.85rem;
    }

    /* Sticky Footer */
    .main-footer {
        margin-top: auto;
    }

    /* Overflow Prevention */
    html, body {
        overflow-x: hidden;
    }

    /* Content Wrapper */
    .content-wrapper {
        padding: 0;
    }
}

/* Small Tablets - Footer & Layout (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        font-size: 0.95rem;
    }

    .main-content {
        padding: 1.5rem 0;
    }

    .main-footer {
        padding: 1.75rem 0;
        font-size: 0.9rem;
    }

    .main-footer .d-flex {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .breadcrumb {
        font-size: 0.875rem;
    }
}

/* Medium Devices - Footer & Layout (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    body {
        font-size: 1rem;
    }

    .main-content {
        min-height: calc(100vh - 280px);
        padding: 1.75rem 0;
    }

    .main-footer {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .container-fluid {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Large Devices - Footer & Layout (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .main-content {
        min-height: calc(100vh - 300px);
    }

    .container-fluid {
        max-width: 960px;
        margin: 0 auto;
    }
}

/* Extra Large Devices (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .container-fluid {
        max-width: 1140px;
        margin: 0 auto;
    }
}

/* Extra Extra Large (1400px+) */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }

    .main-footer {
        padding: 2.5rem 0;
    }
}

/* Ultra Wide (1920px+) */
@media (min-width: 1920px) {
    .container-fluid {
        max-width: 1600px;
        margin: 0 auto;
    }

    body {
        font-size: 1.05rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }
}

/* ============================================
   LOGIN PAGE & AUTHENTICATION RESPONSIVE RULES
   ============================================ */

/* Mobile Login (320px - 575px) */
@media (max-width: 575.98px) {
    /* Login Container */
    .login-container {
        padding: 1rem;
        min-height: 100vh;
    }

    /* Login Card */
    .login-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        border-radius: 12px !important;
    }

    .login-card .card-body {
        padding: 1.5rem !important;
    }

    /* Login Logo Section */
    .login-logo-section {
        margin-bottom: 1.5rem;
    }

    .login-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 0.75rem;
    }

    .login-logo img {
        width: 50px;
        height: 50px;
    }

    /* Login Brand Section */
    .login-brand-section {
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .login-brand-title {
        font-size: 2rem;
    }

    .login-brand-subtitle {
        font-size: 1rem;
    }

    /* Login Form Elements */
    .login-card .form-group {
        margin-bottom: 1.25rem;
    }

    .login-card .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .login-card .form-control.has-icon {
        padding-left: 2.75rem;
    }

    .login-card .input-icon {
        left: 12px;
        font-size: 1rem;
    }

    .login-card .password-toggle,
    .login-card .password-toggle-left {
        left: 12px;
        font-size: 1rem;
        padding: 0.375rem;
    }

    /* Login Buttons */
    .login-card .btn-login,
    .login-card .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* Login Links */
    .login-card a {
        font-size: 0.85rem;
    }

    /* Login Footer */
    .login-footer {
        margin-top: 1rem;
        font-size: 0.8rem;
    }

    /* Remember Me Checkbox */
    .login-card .form-check {
        font-size: 0.9rem;
    }

    .login-card .form-check-input {
        width: 1.125rem;
        height: 1.125rem;
    }

    /* Login Divider */
    .login-divider {
        margin: 1.25rem 0;
        font-size: 0.85rem;
    }

    /* Social Login Buttons */
    .social-login-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Login Alert Messages */
    .login-card .alert {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    /* Register/Forgot Password Links */
    .auth-links {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .auth-links a {
        display: block;
    }

    /* Login Title */
    .login-card h2,
    .login-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .login-card h4 {
        font-size: 1.25rem;
    }

    /* Password Strength Indicator */
    .password-strength {
        height: 4px;
        margin-top: 0.5rem;
    }

    /* Two Factor Authentication */
    .otp-input-group {
        gap: 0.5rem;
    }

    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* Small Tablets - Login (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .login-container {
        padding: 1.5rem;
    }

    .login-card {
        width: 100% !important;
        max-width: 500px !important;
    }

    .login-card .card-body {
        padding: 2rem !important;
    }

    .login-logo {
        width: 90px;
        height: 90px;
    }

    .login-logo img {
        width: 55px;
        height: 55px;
    }

    .login-brand-title {
        font-size: 2.5rem;
    }

    .login-card h2,
    .login-card h3 {
        font-size: 1.75rem;
    }

    .otp-input {
        width: 50px;
        height: 50px;
    }
}

/* Medium Devices - Login (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .login-container {
        padding: 2rem;
    }

    .login-card {
        width: 600px !important;
        max-width: 100% !important;
    }

    .login-card .card-body {
        padding: 2.25rem !important;
    }

    .login-logo {
        width: 95px;
        height: 95px;
    }

    .login-logo img {
        width: 58px;
        height: 58px;
    }

    .auth-links {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Large Devices - Login (992px+) */
@media (min-width: 992px) {
    .login-card {
        width: 700px !important;
        max-width: 100% !important;
    }

    .login-card .card-body {
        padding: 2.5rem !important;
    }

    .login-logo {
        width: 100px;
        height: 100px;
    }

    .login-logo img {
        width: 60px;
        height: 60px;
    }
}

/* Landscape Orientation Adjustments for Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .login-container {
        padding: 0.75rem;
    }

    .login-card .card-body {
        padding: 1.25rem !important;
    }

    .login-logo-section {
        margin-bottom: 1rem;
    }

    .login-logo {
        width: 70px;
        height: 70px;
    }

    .login-logo img {
        width: 45px;
        height: 45px;
    }

    .login-card .form-group {
        margin-bottom: 1rem;
    }

    .login-card h2,
    .login-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

/* ============================================
   TYPOGRAPHY & SPACING RESPONSIVE RULES
   ============================================ */

/* Mobile Typography (320px - 575px) */
@media (max-width: 575.98px) {
    /* Headings */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    h4 {
        font-size: 1.125rem;
        line-height: 1.3;
        margin-bottom: 0.625rem;
    }

    h5 {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    h6 {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    /* Paragraphs */
    p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 0.875rem;
    }

    /* Lead Text */
    .lead {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Small Text */
    small,
    .small {
        font-size: 0.8rem;
    }

    /* Text Utilities */
    .text-muted {
        font-size: 0.85rem;
    }

    /* Lists */
    ul,
    ol {
        padding-right: 1.25rem;
        margin-bottom: 1rem;
    }

    li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    /* Description Lists */
    dt {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }

    dd {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    /* Blockquotes */
    blockquote {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    /* Code Blocks */
    code {
        font-size: 0.85rem;
        padding: 0.125rem 0.25rem;
    }

    pre {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    /* Icons */
    i,
    .fa,
    .fas,
    .far,
    .fab {
        font-size: 1rem;
    }

    .icon-sm {
        font-size: 0.875rem;
    }

    .icon-lg {
        font-size: 1.5rem;
    }

    .icon-xl {
        font-size: 2rem;
    }

    /* Spacing Utilities */
    .mb-1 { margin-bottom: 0.375rem !important; }
    .mb-2 { margin-bottom: 0.625rem !important; }
    .mb-3 { margin-bottom: 0.875rem !important; }
    .mb-4 { margin-bottom: 1.25rem !important; }
    .mb-5 { margin-bottom: 1.875rem !important; }

    .mt-1 { margin-top: 0.375rem !important; }
    .mt-2 { margin-top: 0.625rem !important; }
    .mt-3 { margin-top: 0.875rem !important; }
    .mt-4 { margin-top: 1.25rem !important; }
    .mt-5 { margin-top: 1.875rem !important; }

    .pb-1 { padding-bottom: 0.375rem !important; }
    .pb-2 { padding-bottom: 0.625rem !important; }
    .pb-3 { padding-bottom: 0.875rem !important; }
    .pb-4 { padding-bottom: 1.25rem !important; }
    .pb-5 { padding-bottom: 1.875rem !important; }

    .pt-1 { padding-top: 0.375rem !important; }
    .pt-2 { padding-top: 0.625rem !important; }
    .pt-3 { padding-top: 0.875rem !important; }
    .pt-4 { padding-top: 1.25rem !important; }
    .pt-5 { padding-top: 1.875rem !important; }

    /* Gap Utilities */
    .gap-1 { gap: 0.375rem !important; }
    .gap-2 { gap: 0.625rem !important; }
    .gap-3 { gap: 0.875rem !important; }
    .gap-4 { gap: 1.25rem !important; }

    /* Display Text */
    .display-1 { font-size: 3rem; }
    .display-2 { font-size: 2.5rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }
    .display-6 { font-size: 1.25rem; }

    /* Label/Caption Text */
    .caption {
        font-size: 0.75rem;
    }

    /* Links */
    a {
        font-size: 0.9rem;
    }

    /* Text Alignment Mobile Override */
    .text-sm-start {
        text-align: right !important;
    }

    .text-sm-center {
        text-align: center !important;
    }

    .text-sm-end {
        text-align: left !important;
    }
}

/* Small Tablets Typography (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }
    h6 { font-size: 1rem; }

    p { font-size: 0.95rem; }

    .display-1 { font-size: 3.5rem; }
    .display-2 { font-size: 3rem; }
    .display-3 { font-size: 2.5rem; }
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    .display-6 { font-size: 1.5rem; }

    .icon-lg { font-size: 1.75rem; }
    .icon-xl { font-size: 2.25rem; }
}

/* Medium Devices Typography (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
    h5 { font-size: 1.25rem; }
    h6 { font-size: 1.125rem; }

    p { font-size: 1rem; }

    .display-1 { font-size: 4rem; }
    .display-2 { font-size: 3.5rem; }
    .display-3 { font-size: 3rem; }
    .display-4 { font-size: 2.5rem; }
    .display-5 { font-size: 2rem; }
    .display-6 { font-size: 1.75rem; }

    .icon-lg { font-size: 2rem; }
    .icon-xl { font-size: 2.5rem; }
}

/* Large Devices Typography (992px+) */
@media (min-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 2rem; }
    h4 { font-size: 1.75rem; }
    h5 { font-size: 1.5rem; }
    h6 { font-size: 1.25rem; }

    .display-1 { font-size: 5rem; }
    .display-2 { font-size: 4.5rem; }
    .display-3 { font-size: 4rem; }
    .display-4 { font-size: 3.5rem; }
    .display-5 { font-size: 2.5rem; }
    .display-6 { font-size: 2rem; }

    .icon-lg { font-size: 2.25rem; }
    .icon-xl { font-size: 3rem; }
}

/* Extra Large Devices Typography (1400px+) */
@media (min-width: 1400px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 2.25rem; }

    p { font-size: 1.05rem; }

    .display-1 { font-size: 5.5rem; }
    .display-2 { font-size: 5rem; }
}

/* Ultra Wide Typography (1920px+) */
@media (min-width: 1920px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.75rem; }
    h3 { font-size: 2.5rem; }

    p { font-size: 1.1rem; }

    .display-1 { font-size: 6rem; }
    .display-2 { font-size: 5.5rem; }

    .icon-xl { font-size: 3.5rem; }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .top-header,
    .main-navigation,
    .main-footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        padding: 0;
        margin: 0;
    }

    .card,
    .table {
        box-shadow: none;
        border: 1px solid #000;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    table, figure {
        page-break-inside: avoid;
    }
}
}