/* Main Variables */
:root {
    --primary-color: #00c58b;
    --primary-hover: #00a876;
    --secondary-color: #ffffff;
    --text-color: #2d3748;
    --light-gray: #f8f9fa;
    --border-color: #e2e8f0;
    --error-color: #e53e3e;
}

/* General Styles */
body {
    font-family: 'Sahel', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #f5f7fa;
    line-height: 1.6;
}

/* Buttons */
.btn, button {
    /* شكل كلاسيكي بسيط للأزرار */
    border-radius: 4px;
    font-weight: 500;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn:hover, button:hover {
    opacity: 1;
    transform: none;
    box-shadow: none;
}

/* Product Form Button */
#addProductForm .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

#addProductForm .btn-primary:hover,
#addProductForm .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(0, 197, 139, 0.2);
}

#addProductForm .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Dashboard Card Text Colors */
.card-title.text-success,
.card-title.text-info,
.card-title.text-warning,
.card-title.text-primary,
.card-title.text-secondary {
    color: var(--primary-color) !important;
}

/* Navigation Links */
.navbar .nav-link {
    color: white !important;
}

.navbar .nav-link:hover {
    opacity: 0.8;
}

/* Login Page */
.login-page {
    background-color: var(--primary-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-page .card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-page .card-body {
    padding: 2.5rem;
}

.login-page .form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.login-page .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 197, 139, 0.25);
}

.login-page .btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-page .btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* إلغاء الخط أسفل العنوان في لوحة التحكم */
.dashboard .card-title::after {
    content: none;
}

/* Utilities */
.rounded-3 {
    border-radius: 12px !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-page .card {
        margin: 1rem;
    }
    
    .login-page .card-body {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Loading Spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    border-width: 0.15em;
}

/* Error Message */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #fff5f5;
    color: var(--error-color);
    border-right: 4px solid var(--error-color);
}

/* Buttons */
.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 0.4rem 1rem;
    box-shadow: none;
}

.btn-outline-light:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Dashboard Header */
.dashboard-header {
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
    background-color: white;
}

.dashboard-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background-color: var(--primary-color) !important;
}

.icon-wrapper i {
    font-size: 2.2rem;
    color: white !important;
    transition: all 0.3s ease;
}

/* Remove the background opacity classes since we're using solid color */
.bg-primary.bg-opacity-10,
.bg-success.bg-opacity-10,
.bg-info.bg-opacity-10,
.bg-warning.bg-opacity-10,
.bg-secondary.bg-opacity-10 {
    background-color: var(--primary-color) !important;
}

/* Icon Colors */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--primary-hover) !important; }
.text-info { color: #17a2b8 !important; }
.text-warning { color: #ffc107 !important; }
.text-secondary { color: #6c757d !important; }

/* Background Opacity */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--primary-hover) !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-secondary { background-color: #6c757d !important; }

/* Border colors to match site palette */
.border-primary { border-color: var(--primary-color) !important; }
.border-success { border-color: var(--primary-hover) !important; }

.dashboard-card h5 {
    font-weight: 600;
    margin-bottom: 0;
    color: #2d3748;
}

/* Hover Effects */
.hover-effect {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Date Time Display */
#currentDateTime {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-header {
        text-align: center;
        padding: 1rem 0;
    }
    
    .dashboard-header .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-header .text-end {
        text-align: center !important;
    }
    
    .dashboard-card .icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .dashboard-card .icon-wrapper i {
        font-size: 2rem;
    }
}
