/* Modern Professional Enhancements */

body {
    background: #0a0e1a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
}

.card {
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(20px);
}

.stats-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
}

.form-control, .form-select {
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.btn {
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.form-check-label {
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-check:hover .form-check-label {
    color: #a5b4fc;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.table-container {
    border-radius: 8px;
    box-shadow: none;
    backdrop-filter: blur(20px);
    overflow-x: auto;
}

.modal-content {
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.sidebar {
    backdrop-filter: blur(20px);
    box-shadow: none;
}

.field-selector {
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.field-selector:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.data-row {
    animation: fadeIn 0.3s ease forwards;
}

.data-row:nth-child(even) {
    animation-delay: 0.05s;
}

.data-row:nth-child(odd) {
    animation-delay: 0.1s;
}

.stats-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Professional Table Styling */
.table-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: none;
}

.table-dark th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.data-row {
    border-left: none;
}



.table-success-subtle {
    background: transparent !important;
}

.table-success-subtle td {
    color: #e2e8f0 !important;
}

.table-danger-subtle {
    background: transparent !important;
}

.table-danger-subtle td {
    color: #e2e8f0 !important;
}

.btn-group-sm .btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.875rem;
    min-width: 36px;
}

.form-check-input {
    cursor: pointer;
    width: 1.1rem;
    height: 1.1rem;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table > :not(caption) > * > * {
    padding: 0.75rem 0.5rem;
}

.table thead th {
    padding: 1rem 0.5rem;
    font-weight: 600;
}

.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Compact Card Sections */
.compact-header-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
}

.compact-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    min-width: 70px;
}

.compact-stat.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.compact-stat.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: #a5b4fc;
}

.compact-stat.success .stat-value {
    color: #86efac;
}

.compact-stat.danger .stat-value {
    color: #fca5a5;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cbd5e1;
    margin-top: 0.15rem;
}

.compact-filter-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
}

/* Table Improvements */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
}

#dataTable {
    width: 100%;
    min-width: 800px;
}

#dataTable td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
    white-space: normal;
}

.cell-value {
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.error-filter-btn {
    font-size: 0.8rem;
    white-space: nowrap;
}

.error-filter-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    transform: translateY(-1px);
}

.input-group-text {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #cbd5e1;
}

#searchInput {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(99, 102, 241, 0.3);
    color: #fff;
}

#searchInput::placeholder {
    color: #94a3b8;
}

#searchInput:focus {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Modal Enhancements */
.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.modal-footer {
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.modal-title {
    color: #a5b4fc;
    font-weight: 600;
}

/* Button Group Improvements */
.btn-group .btn {
    border-color: rgba(99, 102, 241, 0.3);
}

.btn-group .btn:hover {
    z-index: 1;
}

/* Action Buttons */
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-outline-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.btn-outline-success:hover {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

/* Ensure buttons are visible */
.btn-group-sm .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* CRUD Action Buttons */
.data-row .btn-group {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.data-row:hover .btn-group {
    opacity: 1;
}
