/* Main App Styles */
:root {
    --sidebar-width: 280px;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bs-gray-100);
    min-height: 100vh;
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-right 0.3s ease-in-out;
}

/* Header */
.app-header {
    height: 70px;
    background-color: var(--bs-white);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Content Area */
.app-content {
    flex: 1;
    padding: 1.5rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-primary {
    box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-primary-rgb), 0.4);
}

/* Form Controls */
.form-control,
.form-select {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border-color: var(--bs-border-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

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

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    background-color: var(--bs-gray-100);
    border-bottom: none;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 991.98px) {
    .app-main {
        margin-right: 0;
    }
}

/* Dark Mode Support */
[data-bs-theme="dark"] {
    .app-header,
    .card {
        background-color: var(--bs-dark);
        border-color: var(--bs-border-color);
    }

    .table th {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Utilities */
.shadow-hover {
    transition: box-shadow 0.2s ease-in-out;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Animation */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--bs-gray-200);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

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

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}
