/* DigiFlow Panel - Custom Styles */

:root {
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --success: #198754;
    --danger: #dc3545;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
}

/* Background gradient for login */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    min-height: 100vh;
}

/* Card hover effect */
.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Permissions grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.permission-item {
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
}

.permission-item:hover {
    background: var(--gray-200);
}

.feature-icon {
    display: inline-block;
    width: 1.5rem;
    text-align: center;
}

/* Form switch styling */
.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--success);
    border-color: var(--success);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
}

/* Card title */
.card-title {
    font-weight: 600;
}

/* Badge styling */
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

/* Search input */
#searchDealer:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* Alert animations */
.alert {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.65;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

/* Sticky footer */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* Category sections */
.category-section {
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #fff;
}

.category-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--gray-200);
}

.category-header .badge {
    font-weight: 500;
    font-size: 0.75rem;
}

.category-header .btn-xs {
    font-size: 0.65rem;
}

/* Better tooltips for descriptions */
.form-check-label[title] {
    border-bottom: 1px dotted var(--gray-600);
}
