/* Hykma SuperAdmin Dashboard Styles */

/* Base Variables */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --primary-color: #667eea;
    --primary-dark: #5a6fd6;
    --sidebar-bg: #2c3e50;
    --sidebar-hover: #34495e;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Sidebar */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #ecf0f1;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar.collapsed {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
}

.sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar ul.components {
    padding: 20px 0;
    margin: 0;
}

.sidebar ul li {
    font-size: 0.95rem;
}

.sidebar ul li.nav-section {
    padding: 15px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #95a5a6;
    font-weight: 600;
}

.sidebar ul li a {
    padding: 12px 20px;
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar ul li a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar ul li.active > a {
    background: var(--primary-color);
    color: #fff;
}

.sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Content margin when sidebar is visible */
#content {
    margin-left: var(--sidebar-width);
}

/* Stat Cards */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-icon i {
    display: block;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Modals */
.modal-header {
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Pagination */
.pagination {
    margin: 0;
}

.page-link {
    border: none;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Empty States */
.text-muted.display-1,
.text-muted.display-4 {
    opacity: 0.5;
}

/* Code blocks */
code {
    padding: 0.2em 0.4em;
    background: #f8f9fa;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

pre code {
    padding: 0;
    background: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.active {
        margin-left: 0;
    }

    #content {
        margin-left: 0;
    }

    .stat-card .stat-icon {
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    form {
        display: none !important;
    }

    #content {
        margin-left: 0;
    }
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Utility classes */
.border-start.border-4 {
    border-width: 4px !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-out;
}
