/**
 * Telerik Theme Overrides - MODERN BLUE/PURPLE WITH GLASSMORPHISM
 *
 * 2025 design trends: glass-material effects, depth-mapped lighting, 
 * blurred layers, micro-reflections, vibrant blue/purple palette with white accents.
 */

/* ============================================================================
   MODERN BLUE/PURPLE THEME GLOBAL
   ========================================================================= */

:root {
    /* Override Kendo with modern blue theme colors */
    --kendo-color-primary: var(--brand-primary-main);
    --kendo-color-primary-hover: var(--brand-primary-light);
    --kendo-color-primary-active: var(--brand-primary-darker);

    --kendo-color-on-primary: #FFFFFF;
    --kendo-color-surface: #FFFFFF;
    --kendo-color-on-surface: #1F2937;
    --kendo-color-subtle: #6B7280;

    scroll-behavior: smooth;
}

/* Clean white body with subtle texture */
body {
    background: linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%) !important;
    color: #1F2937 !important;
    min-height: 100vh;
    position: relative;
}

/* Add subtle grid texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(90deg, 
            rgba(59, 130, 246, 0.02) 0px, 
            transparent 1px, 
            transparent 80px, 
            rgba(59, 130, 246, 0.02) 81px),
        repeating-linear-gradient(0deg, 
            rgba(59, 130, 246, 0.02) 0px, 
            transparent 1px, 
            transparent 80px, 
            rgba(59, 130, 246, 0.02) 81px);
    pointer-events: none;
    z-index: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus-visible with blue accent */
*:focus-visible {
    outline: 3px solid var(--brand-primary-main);
    outline-offset: 3px;
    border-radius: 8px;
}

/* ============================================================================
   BUTTONS - MODERN BLUE WITH GLASS EFFECTS
   ========================================================================= */

.k-button {
    border-radius: 12px;
    font-weight: 600;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on hover */
.k-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 600ms ease;
}

.k-button:hover::before {
    left: 100%;
}

.k-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 24px rgba(59, 130, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.k-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Primary Button - Vibrant Blue Gradient with Glass Effect */
.k-button-solid-primary {
    background: var(--brand-gradient-primary-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
    font-weight: 700;
}

.k-button-solid-primary:hover {
    background: var(--brand-gradient-blue-purple);
    box-shadow: 
        0 16px 32px rgba(59, 130, 246, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
}

/* ============================================================================
   NAVIGATION / DRAWER - GLASS MORPHISM
   ========================================================================= */

.k-drawer {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 
        4px 0 24px rgba(59, 130, 246, 0.08),
        inset -1px 0 0 rgba(255, 255, 255, 0.5);
}

.k-drawer-item {
    border-radius: 12px;
    margin: 0.4rem 0.75rem;
    padding: 1rem 1.25rem;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    color: #4B5563 !important;
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

/* Glass reflection on nav items */
.k-drawer-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

.k-drawer-item:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    color: #1D4ED8 !important;
    transform: translateX(6px);
    box-shadow: 
        0 8px 16px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.k-drawer-item:hover::before {
    opacity: 1;
}

.k-drawer-item.k-selected,
.k-drawer-item.k-state-selected {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15), 
        rgba(139, 92, 246, 0.1)) !important;
    color: #2563EB !important;
    font-weight: 700;
    border-left: 4px solid var(--brand-primary-main);
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.k-drawer-item .k-icon,
.k-drawer-item .k-svg-icon {
    color: #6B7280;
}

.k-drawer-item:hover .k-icon,
.k-drawer-item:hover .k-svg-icon {
    color: #2563EB;
}

.k-drawer-item.k-selected .k-icon,
.k-drawer-item.k-state-selected .k-icon {
    color: var(--brand-primary-main);
}

/* ============================================================================
   APP BAR - PREMIUM GLASS WITH BLUE ACCENT
   ========================================================================= */

/* Top AppBar - Frosted glass with blue-purple gradient border */
.appbar-top.k-appbar {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 3px solid transparent;
    border-image: var(--brand-gradient-blue-purple) 1;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#app-title a {
    background: var(--brand-gradient-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Bottom AppBar - Subtle glass footer */
.appbar-bottom.k-appbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #6B7280;
    border-top: 1px solid rgba(59, 130, 246, 0.12);
    box-shadow: 
        0 -4px 24px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ============================================================================
   MAIN CONTENT - CLEAN WHITE WITH DEPTH
   ========================================================================= */

main {
    background: transparent !important;
    color: #1F2937;
    animation: fadeIn 400ms ease-in-out;
    position: relative;
    z-index: 1;
}

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

/* ============================================================================
   GRID / TABLE - MODERN WITH GLASS EFFECTS
   ========================================================================= */

.k-grid {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 8px 40px rgba(59, 130, 246, 0.12),
        0 2px 8px rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Grid Header - Glass with blue-purple gradient */
.k-grid-header {
    background: linear-gradient(180deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(139, 92, 246, 0.05) 100%) !important;
    border-bottom: 2px solid var(--brand-primary-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

.k-grid-header th {
    padding: 1.25rem 1.5rem;
    color: #1D4ED8 !important;
    position: relative;
}

/* Subtle separator between columns */
.k-grid-header th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 30%;
    height: 40%;
    width: 1px;
    background: rgba(59, 130, 246, 0.15);
}

/* Grid Rows - Clean with hover depth */
.k-grid tbody tr {
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    background: #FFFFFF !important;
    position: relative;
}

.k-grid tbody tr::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05), 
        transparent);
    opacity: 0;
    transition: opacity 250ms ease;
    pointer-events: none;
}

.k-grid tbody tr:hover {
    background: #FFFFFF !important;
    border-left-color: var(--brand-primary-main);
    box-shadow: 
        inset 0 0 40px rgba(59, 130, 246, 0.06),
        0 4px 16px rgba(59, 130, 246, 0.08);
    transform: translateX(2px);
}

.k-grid tbody tr:hover::before {
    opacity: 1;
}

.k-grid tbody tr:nth-child(even) {
    background: #F9FAFB !important;
}

.k-grid tbody tr:nth-child(even):hover {
    background: #FFFFFF !important;
}

.k-grid td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    color: #374151 !important;
}

/* Grid Pager - Glass footer */
.k-pager {
    border-top: 2px solid rgba(59, 130, 246, 0.12);
    background: linear-gradient(180deg, 
        rgba(249, 250, 251, 0.95), 
        rgba(255, 255, 255, 0.98)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.25rem;
    color: #6B7280 !important;
}

.k-pager .k-button {
    background: rgba(59, 130, 246, 0.08);
    color: #2563EB;
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-weight: 600;
}

.k-pager .k-button:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--brand-primary-main);
    color: #1D4ED8;
}

.k-pager .k-button[disabled] {
    opacity: 0.4;
}

/* ============================================================================
   INPUTS & FORMS - MODERN WITH DEPTH
   ========================================================================= */

.k-input,
.k-textbox,
.k-textarea,
.k-dateinput,
.k-numerictextbox,
.k-dropdownlist,
.k-combobox {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(59, 130, 246, 0.25) !important;
    color: #1F2937 !important;
    border-radius: 10px;
    box-shadow: 
        inset 0 2px 4px rgba(59, 130, 246, 0.05),
        0 1px 2px rgba(59, 130, 246, 0.08);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.k-input:hover,
.k-textbox:hover,
.k-textarea:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 
        inset 0 2px 4px rgba(59, 130, 246, 0.08),
        0 4px 8px rgba(59, 130, 246, 0.12);
}

.k-input:focus,
.k-textbox:focus,
.k-textarea:focus {
    border-color: var(--brand-primary-main) !important;
    box-shadow: 
        inset 0 2px 4px rgba(59, 130, 246, 0.08),
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 8px 16px rgba(59, 130, 246, 0.12);
}

/* Dropdown/Combobox buttons */
.k-input-button,
.k-select {
    background: rgba(59, 130, 246, 0.08) !important;
    color: #2563EB !important;
    border-left: 1px solid rgba(59, 130, 246, 0.2) !important;
    transition: all 250ms ease;
}

.k-input-button:hover,
.k-select:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #1D4ED8 !important;
}

/* ============================================================================
   LOADER - PREMIUM BLUE
   ========================================================================= */

.k-loader-container {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.k-loader {
    color: var(--brand-primary-main);
}

/* ============================================================================
   HEADINGS - DARK TEXT WITH BLUE ACCENTS
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
    color: #111827 !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    background: var(--brand-gradient-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   CARDS & PANELS - GLASS EFFECTS
   ========================================================================= */

.k-card,
.k-panelbar {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ============================================================================
   TOOLTIPS - MODERN WITH BLUR
   ========================================================================= */

.k-tooltip {
    background: rgba(37, 99, 235, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    color: white !important;
    font-weight: 600;
}
