/* Admin Panel Custom Styles */

/* Fix layout for full height */
html, body {
    height: 100%;
}

/* Card hover effects */
.card {
    transition: box-shadow 0.15s ease-in-out;
}

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

/* Dashboard cards */
.card.bg-primary .btn-light:hover,
.card.bg-success .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Table improvements */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Button groups */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Badge improvements */
.badge {
    font-weight: 500;
}

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Search form */
.d-flex.gap-2 > * {
    margin-right: 0.5rem;
}

.d-flex.gap-2 > *:last-child {
    margin-right: 0;
}

/* Code styling */
code {
    color: #e83e8c;
    background-color: #f8f9fa;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

/* Login page */
.card.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Loading states */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Desktop-specific improvements */
@media (min-width: 992px) {
    /* Ensure proper spacing on desktop */
    .container {
        max-width: 1400px;
    }
    
    /* Better spacing for form columns */
    .col-md-8 .card {
        margin-right: 1rem;
    }
    
    /* Improved table spacing */
    .table th,
    .table td {
        padding: 0.75rem 1rem;
    }
    
    /* Better button spacing */
    .btn-group .btn {
        min-width: 80px;
    }
    
    /* Form improvements */
    .form-control,
    .form-select {
        min-height: 38px;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1.5rem;
    }
}

/* Tablet-specific improvements */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 960px;
    }
    
    .col-md-8 {
        flex: 0 0 70%;
        max-width: 70%;
    }
    
    .col-md-4 {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* Stack form columns on mobile */
    .col-md-8,
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

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

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* Navbar improvements */
.navbar-brand {
    font-weight: 600;
}

.navbar-nav .nav-link {
    font-weight: 500;
}

/* Card header improvements */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Text utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Content width constraints */
.admin-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Form width constraints */
.form-container {
    max-width: 800px;
}

.form-sidebar {
    max-width: 350px;
}

/* Dashboard card improvements */
.dashboard-stats .card {
    min-height: 120px;
}

.dashboard-stats .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Better spacing for action buttons */
.btn-group .btn {
    white-space: nowrap;
}

/* Improved pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

/* Better form field spacing */
.form-group,
.mb-3 {
    margin-bottom: 1.5rem;
}

/* Improved card layouts */
.card-body {
    padding: 1.5rem;
}

/* Better table row height */
.table td {
    vertical-align: middle;
    line-height: 1.5;
}