/* Custom Dashboard Styles */

/* Global Styles */
body {
    font-family: 'Cairo', sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    color: #000000;
}

/* Login Layout Enhancements */
.login-page-wrapper {
    background-image: url('../img/LogInCover.Png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.login-page-wrapper::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Dashboard Layout Enhancements */
.sidebar {
    background: #ffffff;
    border-left: 1px solid #e0e0e0;
}

.sidebar-header {
    background: #ffffff;
    border-radius: 15px;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

.sidebar-logo {
    filter: none;
}

.nav-link {
    border-radius: 10px;
    margin: 0.25rem 1rem;
    transition: all 0.3s ease;
    color: #000000;
}

.nav-link:hover {
    background: #f5f5f5;
    transform: translateX(-5px);
    color: #000000;
}

.nav-link.active {
    background: #f0f0f0;
    color: #000000;
    border-right: 3px solid #000000;
}

/* Card Styles */
.card {
    border: 1px solid #e0e0e0;
    background: #ffffff;
}

.card-header {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-bottom: 2px solid #000000;
    color: #000000;
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    color: #000000;
}

.btn-primary {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}

.btn-primary:hover {
    background: #f5f5f5;
    color: #000000;
}

.btn-outline-primary {
    border: 2px solid #000000;
    color: #000000;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #000000;
    color: #ffffff;
}

.btn-success {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}

.btn-success:hover {
    background: #f5f5f5;
    color: #000000;
}

.btn-warning {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}

.btn-warning:hover {
    background: #f5f5f5;
    color: #000000;
}

.btn-danger {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}

.btn-danger:hover {
    background: #f5f5f5;
    color: #000000;
}

.btn-info {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}

.btn-info:hover {
    background: #f5f5f5;
    color: #000000;
}

/* Table Enhancements */
.table {
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.table thead th {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: #000000;
}

.table tbody tr {
    background: #ffffff;
}

.table tbody tr:hover {
    background: #f5f5f5;
}

.table tbody td {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    color: #000000;
}

/* Form Enhancements */
.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    background: #ffffff;
    color: #000000;
}

.form-control:focus {
    border-color: #000000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

.input-group-text {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #000000;
    font-weight: 500;
}

/* Alert Enhancements */
.alert {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-weight: 500;
    background: #ffffff;
    color: #000000;
}

.alert-success {
    background: #ffffff;
    color: #000000;
    border-left: 4px solid #000000;
}

.alert-danger {
    background: #ffffff;
    color: #000000;
    border-left: 4px solid #000000;
}

.alert-warning {
    background: #ffffff;
    color: #000000;
    border-left: 4px solid #000000;
}

.alert-info {
    background: #ffffff;
    color: #000000;
    border-left: 4px solid #000000;
}

/* Page Header */
.page-header {
    background: #ffffff;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.page-title {
    color: #000000;
    font-weight: 700;
}

.page-subtitle {
    color: #000000;
}

/* Top Navbar */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

/* User Profile */
.user-profile {
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.user-profile:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.user-avatar {
    background: #000000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

/* Badge Styles */
.badge {
    background: #000000;
    color: #ffffff;
}

.bg-primary {
    background: #000000 !important;
}

.bg-success {
    background: #000000 !important;
}

.bg-warning {
    background: #000000 !important;
}

.bg-danger {
    background: #000000 !important;
}

.bg-info {
    background: #000000 !important;
}

/* Text Colors */
.text-primary {
    color: #000000 !important;
}

.text-success {
    color: #000000 !important;
}

.text-warning {
    color: #000000 !important;
}

.text-danger {
    color: #000000 !important;
}

.text-info {
    color: #000000 !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-right: 250px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-right: 220px;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 1050;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        padding: 0;
    }
    
    .content-wrapper {
        padding: 0.5rem;
    }
    
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
    }
    
    /* Mobile Navigation */
    .top-navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Mobile Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile Tables */
    .table-responsive {
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    /* Mobile Forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    /* Mobile Buttons */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
    
    /* Mobile Alerts */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile Statistics Cards */
    .row .col-lg-3,
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Mobile Search Forms */
    .d-flex {
        flex-direction: column;
    }
    
    .d-flex .form-control,
    .d-flex .form-select,
    .d-flex .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    /* Mobile Action Buttons */
    .btn-group .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Mobile Modal */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 0.25rem;
    }
    
    .page-header {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.25rem 0.1rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 0.5rem;
        font-size: 14px;
    }
    
    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Hide some columns on very small screens */
    .table .d-none-mobile {
        display: none !important;
    }
    
    /* Stack form elements */
    .row .col-md-6,
    .row .col-md-4,
    .row .col-md-8 {
        margin-bottom: 0.5rem;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .page-header {
        padding: 0.75rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .content-wrapper {
        padding: 0 !important;
    }
    
    .page-header {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 12px !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000000;
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #000000;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .content-wrapper {
        padding: 0 !important;
    }
}