/* SPool Admin Panel Custom Styles */

/* Custom Brand Colors */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

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

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

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

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Data Tables */
.data-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table .table {
    margin-bottom: 0;
}

.data-table .table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

/* Action Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    margin: 0 0.125rem;
    font-size: 0.875rem;
}

.btn-action.btn-sm {
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* Form Styles */
.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Alert Styles */
.alert-custom {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success-custom {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger-custom {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning-custom {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info-custom {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Fixed Alert Position - Prevents Layout Issues */
.alert {
    position: relative;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.75rem 1.25rem;
    z-index: 1000;
}

.alert-dismissible {
    padding-right: 4rem;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
    color: inherit;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
}

.alert-dismissible .close:hover {
    opacity: 0.75;
}

/* Prevent Alert from Breaking Layout */
.content .alert {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Toast-like Alert for Success Messages */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

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

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Sidebar Customization */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Sidebar Active State */
.nav-sidebar .nav-item.menu-open > .nav-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-sidebar .nav-treeview .nav-item .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-left: 3px solid #fff;
}

.nav-sidebar .nav-treeview .nav-item .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Sidebar Menu Icons */
.nav-sidebar .nav-item > .nav-link i.right {
    transition: transform 0.3s ease;
}

.nav-sidebar .nav-item.menu-open > .nav-link i.right {
    transform: rotate(90deg);
}

/* Content Header */
.content-header h1 {
    color: #495057;
    font-weight: 600;
}

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

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-card .card-body {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
}


/* Print Styles */
@media print {
    .main-sidebar,
    .main-header,
    .main-footer,
    .content-header {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .content {
        padding: 0 !important;
    }
}
