/* =====================================================
   GRID - Syncfusion Grid customization
   ===================================================== */

.e-grid {
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* --- Header --- */
.e-grid .e-gridheader {
    background: #f8f9ff !important;
    border: none !important;
}

.e-grid .e-headercell {
    background: #f8f9ff !important;
    color: #4459D7 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-color: #f0f0f0 !important;
}

/* --- Rows --- */
.e-grid .e-row {
    border-bottom: 1px solid #f0f0f0 !important;
}

.e-grid .e-row:hover {
    background: #f8f9ff !important;
}

.e-grid .e-altrow {
    background: #fafafa !important;
}

/* --- Cells --- */
.e-grid .e-rowcell {
    padding: 16px !important;
    border-color: #f0f0f0 !important;
}

/* --- Search box in toolbar --- */
.e-grid .e-toolbar .e-search {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
}

.e-grid .e-toolbar .e-search:focus-within {
    border-color: #4459D7 !important;
}

/* --- Filter bar --- */
.e-grid .e-filterbar {
    background: #fafafa !important;
}

.e-grid .e-filterbar .e-filterbarcell {
    background: #fafafa !important;
}

.e-grid .e-filterbar input {
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
}

.e-grid .e-filterbar input:focus {
    border-color: #4459D7 !important;
    outline: none !important;
}

/* --- Pager --- */
.e-grid .e-pager {
    background: #fafafa !important;
    border: none !important;
    border-top: 1px solid #f0f0f0 !important;
    padding: 16px !important;
}

.e-grid .e-pager .e-numericitem {
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    color: #4459D7 !important;
    font-weight: 600 !important;
}

.e-grid .e-pager .e-currentitem {
    background: #4459D7 !important;
    color: white !important;
    border-color: #4459D7 !important;
}

/* --- Item Info (Avatar + Details) --- */
.item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4459D7 0%, #36C1FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.item-avatar.logo {
    border-radius: 8px;
}

.item-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-email {
    font-size: 12px;
    color: #6b6b6b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Grid Loading Spinner (reemplaza spinner predeterminado) --- */
.e-grid .e-spinner-pane {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(2px);
}

.e-grid .e-spinner-pane .e-spinner-inner {
    display: none !important;
}

/* Spinner circular limpio */
.e-grid .e-spinner-pane::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #4459D7;
    border-radius: 50%;
    animation: grid-spinner 0.8s linear infinite;
}

@keyframes grid-spinner {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Grid Skeleton (EmptyRecordTemplate) --- */
.grid-skeleton-container {
    padding: 8px 0;
}

.grid-skeleton-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.grid-skeleton-row:last-child {
    border-bottom: none;
}

.skeleton-cell {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-text-lg {
    width: 180px;
    height: 16px;
}

.skeleton-text-md {
    width: 120px;
    height: 14px;
}

.skeleton-text-sm {
    width: 80px;
    height: 12px;
}

.skeleton-badge {
    width: 80px;
    height: 24px;
    border-radius: 12px;
}

.skeleton-actions {
    width: 60px;
    height: 28px;
    border-radius: 6px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
