/*
|--------------------------------------------------------------------------
| Viartas Admin Theme - Modern Dashboard Styles
| A distinctive, refined admin panel using Bootstrap 5
|--------------------------------------------------------------------------
*/

/* ========================================================================
   CSS Custom Properties (Theme Variables)
   ======================================================================== */

:root {
    /* Primary Palette - Deep Indigo */
    --vt-primary: #6366f1;
    --vt-primary-hover: #4f46e5;
    --vt-primary-light: rgba(99, 102, 241, 0.1);
    --vt-primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    /* Secondary Palette */
    --vt-secondary: #64748b;
    --vt-secondary-hover: #475569;

    /* Status Colors */
    --vt-success: #10b981;
    --vt-success-light: rgba(16, 185, 129, 0.1);
    --vt-danger: #ef4444;
    --vt-danger-light: rgba(239, 68, 68, 0.1);
    --vt-warning: #f59e0b;
    --vt-warning-light: rgba(245, 158, 11, 0.1);
    --vt-info: #06b6d4;
    --vt-info-light: rgba(6, 182, 212, 0.1);

    /* Dark Theme - Slate Palette */
    --vt-dark-900: #0f172a;
    --vt-dark-800: #1e293b;
    --vt-dark-700: #334155;
    --vt-dark-600: #475569;
    --vt-dark-500: #64748b;
    --vt-dark-400: #94a3b8;
    --vt-dark-300: #cbd5e1;
    --vt-dark-200: #e2e8f0;
    --vt-dark-100: #f1f5f9;
    --vt-dark-50: #f8fafc;

    /* Sidebar */
    --vt-sidebar-width: 280px;
    --vt-sidebar-collapsed-width: 80px;
    --vt-sidebar-bg: var(--vt-dark-900);
    --vt-sidebar-border: rgba(255, 255, 255, 0.05);

    /* Header */
    --vt-header-height: 70px;
    --vt-header-bg: rgba(255, 255, 255, 0.95);
    --vt-header-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

    /* Content */
    --vt-content-bg: #f8fafc;
    --vt-card-bg: #ffffff;
    --vt-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --vt-card-hover-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);

    /* Typography */
    --vt-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --vt-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Border Radius */
    --vt-radius-sm: 6px;
    --vt-radius: 10px;
    --vt-radius-lg: 16px;
    --vt-radius-xl: 24px;

    /* Transitions */
    --vt-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --vt-transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --vt-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --vt-content-bg: var(--vt-dark-900);
    --vt-card-bg: var(--vt-dark-800);
    --vt-header-bg: rgba(30, 41, 59, 0.95);
    --vt-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================================================================
   Base Styles & Reset
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--vt-font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--vt-dark-700);
    background: var(--vt-content-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================================================
   Layout Structure
   ======================================================================== */

.table-responsive {
    height: 650px!important;
}

div.dataTables_wrapper .table-responsive {
    overflow-y: auto;
    height: 490px!important;
}

.vt-wrapper {
    display: flex;
    min-height: 100vh;
}

.vt-main {
    flex: 1;
    margin-left: var(--vt-sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--vt-transition);
}

.vt-main.sidebar-collapsed {
    margin-left: var(--vt-sidebar-collapsed-width);
}

.vt-content {
//padding: 24px 32px;
    padding: calc(var(--vt-header-height) + 20px) 20px 20px;
//padding-top: calc(var(--vt-header-height) + 24px);
    min-height: 100vh;
}

@media (max-width: 1199.98px) {
    .vt-main {
        margin-left: 0;
    }

    .vt-content {
        padding: 16px;
        padding-top: calc(var(--vt-header-height) + 16px);
    }
}

/* ========================================================================
   Sidebar Styles
   ======================================================================== */

.vt-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--vt-sidebar-width);
    height: 100vh;
    background: var(--vt-sidebar-bg);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width var(--vt-transition), transform var(--vt-transition);
    overflow: hidden;
}

.vt-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.vt-sidebar.collapsed {
    width: var(--vt-sidebar-collapsed-width);
}

/* Sidebar Brand */
.vt-sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--vt-sidebar-border);
    position: relative;
    z-index: 1;
}

.vt-sidebar-brand-logo {
    width: 40px;
    height: 40px;
    background: var(--vt-primary-gradient);
    border-radius: var(--vt-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.vt-sidebar-brand-logo svg,
.vt-sidebar-brand-logo i {
    color: white;
    font-size: 20px;
}

.vt-sidebar-brand-text {
    margin-left: 14px;
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--vt-transition);
}

.vt-sidebar.collapsed .vt-sidebar-brand-text {
    opacity: 0;
    pointer-events: none;
}

/* Sidebar Menu */
.vt-sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

.vt-sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.vt-sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.vt-sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--vt-dark-600);
    border-radius: 2px;
}

/* Menu Section Title */
.vt-menu-section {
    padding: 16px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vt-dark-500);
    white-space: nowrap;
    overflow: hidden;
}

.vt-sidebar.collapsed .vt-menu-section {
    text-align: center;
    padding: 16px 8px 8px;
    display: none;
}

.vt-sidebar.collapsed .vt-menu-section span {
    display: none;
}

.vt-sidebar.collapsed .vt-menu-section::after {
    content: '•••';
    font-size: 8px;
    letter-spacing: 2px;
}

/* Menu Items */
.vt-menu-item {
    margin-bottom: 4px;
}

.vt-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--vt-dark-400);
    text-decoration: none;
    border-radius: var(--vt-radius);
    transition: all var(--vt-transition-fast);
    position: relative;
    overflow: hidden;
}

.vt-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--vt-primary);
    opacity: 0;
    transition: opacity var(--vt-transition-fast);
    border-radius: 0 3px 3px 0;
}

.vt-menu-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.vt-menu-link.active {
    color: white;
    background: var(--vt-primary-light);
}

.vt-menu-link.active::before {
    opacity: 1;
}

.vt-menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 14px;
    font-size: 18px;
    opacity: 0.8;
    transition: all var(--vt-transition-fast);
}

/* Font Awesome icon sizing in menu */
.vt-menu-icon .fa,
.vt-menu-icon .fas,
.vt-menu-icon .far,
.vt-menu-icon .fab,
.vt-menu-icon .fa-solid,
.vt-menu-icon .fa-regular,
.vt-menu-icon .fa-brands {
    font-size: 16px;
}

.vt-menu-link:hover .vt-menu-icon,
.vt-menu-link.active .vt-menu-icon {
    opacity: 1;
}

.vt-menu-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--vt-transition);
}

.vt-sidebar.collapsed .vt-menu-text {
    opacity: 0;
    pointer-events: none;
}

.vt-sidebar.collapsed .vt-menu-icon {
    margin-right: 0;
}

/* Menu Badge */
.vt-menu-badge {
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50px;
    background: var(--vt-primary);
    color: white;
    margin-left: auto;
}

.vt-menu-badge.success {
    background: var(--vt-success);
}

.vt-menu-badge.danger {
    background: var(--vt-danger);
}

.vt-menu-badge.warning {
    background: var(--vt-warning);
}

.vt-sidebar.collapsed .vt-menu-badge {
    display: none;
}

/* Submenu */
.vt-menu-arrow {
    margin-left: auto;
    transition: transform var(--vt-transition-fast);
    font-size: 12px;
}

.vt-menu-item.open > .vt-menu-link .vt-menu-arrow {
    transform: rotate(90deg);
}

.vt-submenu {
    display: none;
    padding-left: 34px;
}

.vt-menu-item.open > .vt-submenu {
    display: block;
}

.vt-submenu .vt-menu-link {
    padding: 10px 16px;
    font-size: 13px;
}

.vt-submenu .vt-menu-link::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--vt-dark-500);
}

.vt-submenu .vt-menu-link:hover::before,
.vt-submenu .vt-menu-link.active::before {
    background: var(--vt-primary);
    opacity: 1;
}

.vt-sidebar.collapsed .vt-submenu {
    display: none !important;
}

/* Sidebar Footer */
.vt-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--vt-sidebar-border);
    position: relative;
    z-index: 1;
}

.vt-sidebar-user {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--vt-radius);
    cursor: pointer;
    transition: background var(--vt-transition-fast);
}

.vt-sidebar-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.vt-sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--vt-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.vt-sidebar-user-info {
    margin-left: 12px;
    overflow: hidden;
    transition: opacity var(--vt-transition);
}

.vt-sidebar.collapsed .vt-sidebar-user-info {
    opacity: 0;
    pointer-events: none;
}

.vt-sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vt-sidebar-user-role {
    font-size: 12px;
    color: var(--vt-dark-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Sidebar */
@media (max-width: 1199.98px) {
    .vt-sidebar {
        transform: translateX(-100%);
    }

    .vt-sidebar.show {
        transform: translateX(0);
    }

    .vt-sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1039;
        opacity: 0;
        visibility: hidden;
        transition: all var(--vt-transition);
    }

    .vt-sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
}

/* ========================================================================
   Header Styles
   ======================================================================== */

.vt-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--vt-sidebar-width);
    height: var(--vt-header-height);
    background: var(--vt-header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--vt-header-shadow);
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 24px;
    transition: left var(--vt-transition);
}

.vt-header.sidebar-collapsed {
    left: var(--vt-sidebar-collapsed-width);
}

@media (max-width: 1199.98px) {
    .vt-header {
        left: 0;
        padding: 0 16px;
    }
}

/* Header Toggle */
.vt-header-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--vt-dark-600);
    border-radius: var(--vt-radius);
    cursor: pointer;
    transition: all var(--vt-transition-fast);
    margin-right: 16px;
}

.vt-header-toggle:hover {
    background: var(--vt-dark-100);
    color: var(--vt-dark-800);
}

/* Header Search */
.vt-header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.vt-header-search-input {
    width: 100%;
    height: 44px;
    padding: 0 44px;
    border: 1px solid var(--vt-dark-200);
    border-radius: var(--vt-radius-lg);
    background: var(--vt-dark-50);
    font-size: 14px;
    color: var(--vt-dark-700);
    transition: all var(--vt-transition-fast);
}

.vt-header-search-input:focus {
    outline: none;
    border-color: var(--vt-primary);
    box-shadow: 0 0 0 3px var(--vt-primary-light);
    background: white;
}

.vt-header-search-input::placeholder {
    color: var(--vt-dark-400);
}

.vt-header-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vt-dark-400);
    font-size: 18px;
    pointer-events: none;
}

.vt-header-search-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.vt-header-search-kbd kbd {
    padding: 4px 8px;
    font-size: 11px;
    font-family: var(--vt-font-mono);
    background: var(--vt-dark-100);
    border: 1px solid var(--vt-dark-200);
    border-radius: 4px;
    color: var(--vt-dark-500);
}

/* Header Actions */
.vt-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.vt-header-action {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--vt-dark-600);
    border-radius: var(--vt-radius);
    cursor: pointer;
    transition: all var(--vt-transition-fast);
    position: relative;
}

.vt-header-action:hover {
    background: var(--vt-dark-100);
    color: var(--vt-dark-800);
}

.vt-header-action-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--vt-danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* Header User */
.vt-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    background: var(--vt-dark-50);
    border-radius: 50px;
    cursor: pointer;
    transition: background var(--vt-transition-fast);
    margin-left: 8px;
    border: none;
}

.vt-header-user:hover {
    background: var(--vt-dark-100);
}

.vt-header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vt-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.vt-header-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--vt-dark-700);
}

.vt-header-user-chevron {
    color: var(--vt-dark-400);
    font-size: 12px;
}

@media (max-width: 767.98px) {
    .vt-header-search {
        display: none;
    }

    .vt-header-user-name {
        display: none;
    }

    .vt-header-user {
        padding: 4px;
        background: transparent;
    }

    .vt-header-user-chevron {
        display: none;
    }
}

/* ========================================================================
   Card Styles - Modern & Beautiful
   ======================================================================== */

.card {
    background: var(--vt-card-bg);
    border-radius: var(--vt-radius-lg);
    box-shadow: var(--vt-card-shadow);
    border: 1px solid var(--vt-dark-100);
    transition: all var(--vt-transition);
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--vt-card-hover-shadow);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--vt-dark-100);
    background: transparent;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--vt-dark-800);
    margin: 0;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--vt-dark-500);
    margin-top: 4px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--vt-dark-100);
    background: var(--vt-dark-50);
}

.card-text {
    color: var(--vt-dark-600);
    line-height: 1.7;
}

/* Card with Gradient Border */
.card-gradient-border {
    border: none;
    background: linear-gradient(135deg, var(--vt-primary), #8b5cf6, #ec4899) padding-box,
    linear-gradient(135deg, var(--vt-primary), #8b5cf6, #ec4899) border-box;
    border: 2px solid transparent;
    position: relative;
}

.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--vt-card-bg);
    border-radius: calc(var(--vt-radius-lg) - 2px);
    z-index: 0;
}

.card-gradient-border > * {
    position: relative;
    z-index: 1;
}

/* Card with Glow Effect */
.card-glow {
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow:
        0 0 20px rgba(99, 102, 241, 0.1),
        0 0 40px rgba(99, 102, 241, 0.05),
        var(--vt-card-shadow);
}

.card-glow:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow:
        0 0 30px rgba(99, 102, 241, 0.15),
        0 0 60px rgba(99, 102, 241, 0.1),
        var(--vt-card-hover-shadow);
}

/* Card with Top Accent */
.card-accent {
    border-top: 4px solid var(--vt-primary);
}

.card-accent.accent-success {
    border-top-color: var(--vt-success);
}

.card-accent.accent-danger {
    border-top-color: var(--vt-danger);
}

.card-accent.accent-warning {
    border-top-color: var(--vt-warning);
}

.card-accent.accent-info {
    border-top-color: var(--vt-info);
}

/* Card with Gradient Accent */
.card-accent-gradient {
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--vt-primary), #8b5cf6, #ec4899) 1;
}

/* Glassmorphism Card */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card-glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .card-glass:hover {
    background: rgba(30, 41, 59, 0.85);
}

/* Gradient Background Cards */
.card-gradient-primary {
    background: var(--vt-primary-gradient);
    border: none;
    color: white;
}

.card-gradient-primary .card-title,
.card-gradient-primary .card-text,
.card-gradient-primary .card-subtitle {
    color: white;
}

.card-gradient-primary .card-subtitle {
    opacity: 0.8;
}

.card-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.card-gradient-success .card-title,
.card-gradient-success .card-text {
    color: white;
}

.card-gradient-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: none;
    color: white;
}

.card-gradient-dark .card-title,
.card-gradient-dark .card-text {
    color: white;
}

.card-gradient-sunset {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border: none;
    color: white;
}

.card-gradient-sunset .card-title,
.card-gradient-sunset .card-text {
    color: white;
}

.card-gradient-ocean {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    border: none;
    color: white;
}

.card-gradient-ocean .card-title,
.card-gradient-ocean .card-text {
    color: white;
}

/* Card with Icon Badge */
.card-icon-badge {
    position: relative;
    padding-top: 40px;
}

.card-icon-badge .card-icon {
    position: absolute;
    top: -24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: var(--vt-radius);
    background: var(--vt-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.card-icon-badge .card-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.card-icon-badge .card-icon.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.card-icon-badge .card-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

/* Card with Pattern Background */
.card-pattern {
    position: relative;
    overflow: hidden;
}

.card-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
    pointer-events: none;
}

.card-pattern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    transform: translate(-30%, 30%);
    pointer-events: none;
}

/* Card Hover Lift */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Card with Ribbon */
.card-ribbon {
    position: relative;
    overflow: hidden;
}

.card-ribbon .ribbon {
    position: absolute;
    top: 16px;
    right: -35px;
    background: var(--vt-primary-gradient);
    color: white;
    padding: 6px 40px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.card-ribbon .ribbon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.card-ribbon .ribbon.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Interactive Card */
.card-interactive {
    cursor: pointer;
    border: 2px solid transparent;
}

.card-interactive:hover {
    border-color: var(--vt-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
}

.card-interactive:active {
    transform: scale(0.98);
}

/* Card Image */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: calc(var(--vt-radius-lg) - 1px);
    border-top-right-radius: calc(var(--vt-radius-lg) - 1px);
}

.card-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: white;
    border-bottom-left-radius: calc(var(--vt-radius-lg) - 1px);
    border-bottom-right-radius: calc(var(--vt-radius-lg) - 1px);
}

/* Card Sizes */
.card-sm .card-body {
    padding: 16px;
}

.card-sm .card-header {
    padding: 12px 16px;
}

.card-lg .card-body {
    padding: 32px;
}

.card-lg .card-header {
    padding: 24px 32px;
}

/* Legacy vt-card support */
.vt-card {
    background: var(--vt-card-bg);
    border-radius: var(--vt-radius-lg);
    box-shadow: var(--vt-card-shadow);
    border: 1px solid var(--vt-dark-100);
    transition: all var(--vt-transition);
    overflow: hidden;
}

.vt-card:hover {
    box-shadow: var(--vt-card-hover-shadow);
}

.vt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--vt-dark-100);
}

.vt-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--vt-dark-800);
    margin: 0;
}

.vt-card-subtitle {
    font-size: 13px;
    color: var(--vt-dark-500);
    margin-top: 4px;
}

.vt-card-body {
    padding: 24px;
}

.vt-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--vt-dark-100);
    background: var(--vt-dark-50);
}

/* ========================================================================
   Stats Card
   ======================================================================== */

.vt-stats-card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.vt-stats-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--vt-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

/* Font Awesome icon sizing in stats */
.vt-stats-icon .fa,
.vt-stats-icon .fas,
.vt-stats-icon .far,
.vt-stats-icon .fab,
.vt-stats-icon .fa-solid,
.vt-stats-icon .fa-regular,
.vt-stats-icon .fa-brands {
    font-size: 22px;
}

.vt-stats-icon.primary {
    background: var(--vt-primary-light);
    color: var(--vt-primary);
}

.vt-stats-icon.success {
    background: var(--vt-success-light);
    color: var(--vt-success);
}

.vt-stats-icon.danger {
    background: var(--vt-danger-light);
    color: var(--vt-danger);
}

.vt-stats-icon.warning {
    background: var(--vt-warning-light);
    color: var(--vt-warning);
}

.vt-stats-icon.info {
    background: var(--vt-info-light);
    color: var(--vt-info);
}

.vt-stats-content {
    flex: 1;
}

.vt-stats-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--vt-dark-500);
    margin-bottom: 4px;
}

.vt-stats-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--vt-dark-800);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.vt-stats-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 50px;
}

.vt-stats-change.positive {
    background: var(--vt-success-light);
    color: var(--vt-success);
}

.vt-stats-change.negative {
    background: var(--vt-danger-light);
    color: var(--vt-danger);
}

/* ========================================================================
   Buttons
   ======================================================================== */

.vt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--vt-radius);
    border: none;
    cursor: pointer;
    transition: all var(--vt-transition-fast);
    text-decoration: none;
}

.vt-btn-primary {
    background: var(--vt-primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.vt-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    color: white;
}

.vt-btn-secondary {
    background: var(--vt-dark-100);
    color: var(--vt-dark-700);
}

.vt-btn-secondary:hover {
    background: var(--vt-dark-200);
    color: var(--vt-dark-800);
}

.vt-btn-outline {
    background: transparent;
    border: 1px solid var(--vt-dark-200);
    color: var(--vt-dark-700);
}

.vt-btn-outline:hover {
    border-color: var(--vt-primary);
    color: var(--vt-primary);
    background: var(--vt-primary-light);
}

.vt-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.vt-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.vt-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
}

/* ========================================================================
   Tables
   ======================================================================== */

.vt-table {
    width: 100%;
    border-collapse: collapse;
}

.vt-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--vt-dark-500);
    background: var(--vt-dark-50);
    border-bottom: 1px solid var(--vt-dark-100);
    text-align: left;
}

.vt-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--vt-dark-700);
    border-bottom: 1px solid var(--vt-dark-100);
    vertical-align: middle;
}

.vt-table tbody tr {
    transition: background var(--vt-transition-fast);
}

.vt-table tbody tr:hover {
    background: var(--vt-dark-50);
}

.vt-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================================================
   Badges
   ======================================================================== */

.vt-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
}

.vt-badge-primary {
    background: var(--vt-primary-light);
    color: var(--vt-primary);
}

.vt-badge-success {
    background: var(--vt-success-light);
    color: var(--vt-success);
}

.vt-badge-danger {
    background: var(--vt-danger-light);
    color: var(--vt-danger);
}

.vt-badge-warning {
    background: var(--vt-warning-light);
    color: var(--vt-warning);
}

.vt-badge-info {
    background: var(--vt-info-light);
    color: var(--vt-info);
}

/* ========================================================================
   Form Controls
   ======================================================================== */

.vt-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vt-dark-700);
    margin-bottom: 8px;
}

.vt-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--vt-dark-200);
    border-radius: var(--vt-radius);
    background: white;
    color: var(--vt-dark-700);
    transition: all var(--vt-transition-fast);
}

.vt-form-control:focus {
    outline: none;
    border-color: var(--vt-primary);
    box-shadow: 0 0 0 3px var(--vt-primary-light);
}

.vt-form-control::placeholder {
    color: var(--vt-dark-400);
}

.vt-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* ========================================================================
   Dropdown
   ======================================================================== */

.vt-dropdown {
    position: relative;
    display: inline-block;
}

.vt-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: white;
    border-radius: var(--vt-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--vt-dark-100);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--vt-transition-fast);
    z-index: 1050;
}

.vt-dropdown.show .vt-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.vt-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--vt-dark-700);
    text-decoration: none;
    border-radius: var(--vt-radius-sm);
    transition: all var(--vt-transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.vt-dropdown-item:hover {
    background: var(--vt-dark-50);
    color: var(--vt-dark-800);
}

.vt-dropdown-item i {
    width: 18px;
    color: var(--vt-dark-500);
}

.vt-dropdown-divider {
    height: 1px;
    background: var(--vt-dark-100);
    margin: 8px 0;
}

/* ========================================================================
   Page Header
   ======================================================================== */

.vt-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.vt-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--vt-dark-800);
    margin: 0;
    letter-spacing: -0.5px;
}

.vt-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--vt-dark-500);
    margin-top: 4px;
}

.vt-page-breadcrumb a {
    color: var(--vt-dark-500);
    text-decoration: none;
    transition: color var(--vt-transition-fast);
}

.vt-page-breadcrumb a:hover {
    color: var(--vt-primary);
}

.vt-page-breadcrumb span {
    color: var(--vt-dark-400);
}

/* ========================================================================
   Charts Area
   ======================================================================== */

.vt-chart-container {
    position: relative;
    height: 300px;
}

/* ========================================================================
   Notifications & Toasts
   ======================================================================== */

.vt-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vt-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: var(--vt-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--vt-primary);
    min-width: 320px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.vt-toast.success {
    border-color: var(--vt-success);
}

.vt-toast.danger {
    border-color: var(--vt-danger);
}

.vt-toast.warning {
    border-color: var(--vt-warning);
}

.vt-toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.vt-toast-content {
    flex: 1;
}

.vt-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--vt-dark-800);
}

.vt-toast-message {
    font-size: 13px;
    color: var(--vt-dark-500);
    margin-top: 4px;
}

.vt-toast-close {
    background: none;
    border: none;
    color: var(--vt-dark-400);
    cursor: pointer;
    padding: 0;
    font-size: 18px;
}

/* ========================================================================
   Utilities
   ======================================================================== */

.vt-shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.vt-shadow { box-shadow: var(--vt-card-shadow); }
.vt-shadow-lg { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); }

.vt-rounded { border-radius: var(--vt-radius); }
.vt-rounded-lg { border-radius: var(--vt-radius-lg); }
.vt-rounded-xl { border-radius: var(--vt-radius-xl); }

.vt-text-primary { color: var(--vt-primary); }
.vt-text-success { color: var(--vt-success); }
.vt-text-danger { color: var(--vt-danger); }
.vt-text-warning { color: var(--vt-warning); }
.vt-text-muted { color: var(--vt-dark-500); }

.vt-bg-primary { background-color: var(--vt-primary); }
.vt-bg-primary-light { background-color: var(--vt-primary-light); }
.vt-bg-success { background-color: var(--vt-success); }
.vt-bg-danger { background-color: var(--vt-danger); }

/* Animation utilities */
.vt-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vt-slide-up {
    animation: slideUp 0.3s ease;
}

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

/* ========================================================================
   Responsive Adjustments
   ======================================================================== */

/* Large tablets and below */
@media (max-width: 991.98px) {
    /* Cards */
    .vt-card-body { padding: 20px; }

    /* Tables */
    .vt-table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Forms */
    .vt-form-row { flex-direction: column; gap: 16px; }
    .vt-form-row > * { width: 100%; }

    /* Buttons row */
    .vt-btn-group { flex-wrap: wrap; gap: 8px; }

    /* Filters */
    .vt-filters { flex-wrap: wrap; gap: 12px; }
    .vt-filters > * { min-width: 140px; flex: 1; }
}

/* Tablets */
@media (max-width: 767.98px) {
    /* Page header */
    .vt-page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .vt-page-title { font-size: 22px; }
    .vt-page-breadcrumb { font-size: 12px; }

    /* Cards */
    .vt-card { border-radius: var(--vt-radius); }
    .vt-card-header { padding: 16px; flex-wrap: wrap; gap: 12px; }
    .vt-card-body { padding: 16px; }
    .vt-card-footer { padding: 12px 16px; }
    .vt-card-title { font-size: 16px; }

    /* Stats cards */
    .vt-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .vt-stats-card { padding: 16px; }
    .vt-stats-icon { width: 44px; height: 44px; font-size: 18px; }
    .vt-stats-value { font-size: 22px; }
    .vt-stats-label { font-size: 11px; }

    /* Tables */
    .vt-table th, .vt-table td { padding: 12px 10px; font-size: 13px; }
    .vt-table-actions { gap: 4px; }
    .vt-table-actions .btn { padding: 6px 10px; font-size: 12px; }

    /* Buttons */
    .vt-btn { padding: 10px 16px; font-size: 13px; }
    .vt-btn-sm { padding: 6px 12px; font-size: 12px; }
    .vt-btn-lg { padding: 12px 20px; font-size: 14px; }
    .vt-btn i { font-size: 14px; }

    /* Forms */
    .vt-form-control { padding: 10px 14px; font-size: 14px; }
    .vt-form-label { font-size: 12px; margin-bottom: 6px; }

    /* Filters and toolbars */
    .vt-toolbar { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
    .vt-toolbar-left, .vt-toolbar-right { width: 100%; }
    .vt-search-box { width: 100%; }
    .vt-search-box input { width: 100%; }
    .vt-filters { flex-direction: column; width: 100%; }
    .vt-filters > * { width: 100%; min-width: unset; }
    .vt-filters .form-select,
    .vt-filters .form-control,
    .vt-filters .form-input { width: 100% !important; }

    /* Dropdowns */
    .vt-dropdown-menu { min-width: 180px; }

    /* Modals */
    .vt-modal-dialog { margin: 16px; max-width: calc(100% - 32px); }
    .vt-modal-header { padding: 16px; }
    .vt-modal-body { padding: 16px; }
    .vt-modal-footer { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }

    /* Badges */
    .vt-badge { padding: 4px 8px; font-size: 11px; }

    /* Toast notifications */
    .vt-toast-container { top: 16px; right: 16px; left: 16px; }
    .vt-toast { min-width: unset; max-width: 100%; }

    /* Header */
    .vt-header-search { display: none; }
}

/* Small phones */
@media (max-width: 575.98px) {
    /* Content padding */
    .vt-content { padding: 12px; padding-top: calc(var(--vt-header-height) + 12px); }

    /* Page header */
    .vt-page-header { margin-bottom: 16px; }
    .vt-page-title { font-size: 20px; }

    /* Cards */
    .vt-card { border-radius: 12px; }
    .vt-card-header { padding: 14px; }
    .vt-card-body { padding: 14px; }
    .vt-card-title { font-size: 15px; }

    /* Stats */
    .vt-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .vt-stats-card { padding: 14px; flex-direction: column; text-align: center; gap: 10px; }
    .vt-stats-icon { width: 40px; height: 40px; font-size: 16px; }
    .vt-stats-value { font-size: 20px; }
    .vt-stats-label { font-size: 10px; }

    /* Tables */
    .vt-table th, .vt-table td { padding: 10px 8px; font-size: 12px; }
    .vt-table-actions .btn { padding: 5px 8px; }

    /* Buttons */
    .vt-btn { padding: 8px 14px; font-size: 13px; }
    .vt-btn-icon { width: 36px; height: 36px; }

    /* Forms */
    .vt-form-control { padding: 10px 12px; font-size: 14px; }
    .vt-form-group { margin-bottom: 14px; }

    /* Toolbar */
    .vt-toolbar { padding: 10px; gap: 10px; border-radius: 10px; }

    /* Pagination */
    .vt-pagination { gap: 4px; }
    .vt-pagination .page-link { padding: 6px 10px; font-size: 12px; }

    /* Empty state */
    .vt-empty-state { padding: 40px 20px; }
    .vt-empty-icon { width: 60px; height: 60px; font-size: 24px; }
    .vt-empty-title { font-size: 16px; }
    .vt-empty-text { font-size: 13px; }
}

/* Extra small phones */
@media (max-width: 375px) {
    .vt-content { padding: 10px; padding-top: calc(var(--vt-header-height) + 10px); }

    .vt-page-title { font-size: 18px; }

    .vt-stats-grid { grid-template-columns: 1fr; }
    .vt-stats-card { flex-direction: row; text-align: left; }

    .vt-card-header { padding: 12px; }
    .vt-card-body { padding: 12px; }

    .vt-btn { padding: 8px 12px; font-size: 12px; }
}

/* ========================================
   Card Header with Nav Tabs
   ======================================== */
.card-header-stretch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: var(--vt-card-bg, #fff);
    border-bottom: 1px solid var(--vt-dark-100, #f1f5f9);
    border-radius: 12px 12px 0 0;
}

.card-header-stretch .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--vt-dark-800, #1e293b);
    margin: 0;
}

.card-header-stretch .card-toolbar {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Nav Tabs - Line Style */
.nav-tabs.nav-line-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    border: none;
}

.nav-tabs.nav-line-tabs .nav-item {
    margin: 0;
}

.nav-tabs.nav-line-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--vt-dark-500, #64748b);
    background: transparent;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.nav-tabs.nav-line-tabs .nav-link:hover {
    color: var(--vt-primary, #6366f1);
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
}

.nav-tabs.nav-line-tabs .nav-link.active {
    color: var(--vt-primary, #6366f1);
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
    font-weight: 600;
}

/* Alternative: Underline style */
.nav-tabs.nav-line-tabs.nav-line-tabs-underline .nav-link {
    border-radius: 0;
    padding: 12px 18px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.nav-tabs.nav-line-tabs.nav-line-tabs-underline .nav-link:hover {
    background: transparent;
    border-bottom-color: var(--vt-dark-200, #e2e8f0);
}

.nav-tabs.nav-line-tabs.nav-line-tabs-underline .nav-link.active {
    background: transparent;
    border-bottom-color: var(--vt-primary, #6366f1);
}

/* Nav Stretch - full width distribution */
.nav-tabs.nav-stretch {
    width: 100%;
    justify-content: flex-end;
}

.nav-tabs.nav-stretch .nav-item {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .card-header-stretch {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header-stretch .card-toolbar {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-tabs.nav-line-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs.nav-line-tabs::-webkit-scrollbar {
        height: 0;
        display: none;
    }
}

@media (max-width: 767px) {
    .card-header-stretch {
        padding: 16px;
        gap: 12px;
    }

    .card-header-stretch .card-title {
        font-size: 15px;
    }

    .nav-tabs.nav-line-tabs .nav-link {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ========================================
   Nestable Menu Builder - Drag & Drop
   ======================================== */

/* Nestable Container */
.dd {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

/* List */
.dd-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Nested lists */
.dd-list .dd-list {
    margin-left: 28px !important;
    margin-top: 4px !important;
    padding-left: 14px !important;
    border-left: 2px solid var(--vt-dark-200, #e2e8f0) !important;
}

/* Item */
.dd-item {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Handle - the draggable area */
.dd-handle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 20px 14px !important;
    background: var(--vt-card-bg, #fff) !important;
    border: 1px solid var(--vt-dark-200, #e2e8f0) !important;
    border-radius: 8px !important;
    cursor: grab !important;
    transition: all 0.2s ease !important;
}

.dd-handle:hover {
    background: var(--vt-dark-50, #f8fafc);
    border-color: var(--vt-dark-300, #cbd5e1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dd-handle:active {
    cursor: grabbing;
}

/* Handle content - left side */
.dd-handle > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    float: none !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--vt-dark-700, #334155);
}

/* Menu item name */
.dd-handle .menu-item-name,
.dd-handle > div:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge for item type */
.dd-handle .badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--vt-primary, #6366f1);
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dd-handle .badge-light-primary {
    color: var(--vt-primary, #6366f1);
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
}

/* Menu item buttons - right side */
.menu-item-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    float: none !important;
    flex-shrink: 0;
}

.menu-item-buttons .buttons {
    display: flex;
    gap: 6px;
}

/* Action buttons */
.menu-item-buttons .btn,
.dd-handle .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.menu-item-buttons .btn-danger,
.dd-handle .btn-danger {
    background: var(--vt-danger-light, rgba(239, 68, 68, 0.1)) !important;
    color: var(--vt-danger, #ef4444) !important;
}

.menu-item-buttons .btn-danger:hover,
.dd-handle .btn-danger:hover {
    background: var(--vt-danger, #ef4444) !important;
    color: #fff !important;
    transform: scale(1.05);
}

.menu-item-buttons .btn-primary {
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
    color: var(--vt-primary, #6366f1);
}

.menu-item-buttons .btn-primary:hover {
    background: var(--vt-primary, #6366f1);
    color: #fff;
}

/* Drag placeholder */
.dd-placeholder {
    margin: 4px 0;
    padding: 0;
    min-height: 44px;
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
    border: 2px dashed var(--vt-primary, #6366f1);
    border-radius: 8px;
}

/* Dragging state */
.dd-item.dd-dragging .dd-handle {
    background: var(--vt-primary-light, rgba(99, 102, 241, 0.1));
    border-color: var(--vt-primary, #6366f1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
    transform: rotate(2deg);
}

/* Empty state */
.dd-empty {
    margin: 4px 0;
    padding: 32px;
    min-height: 80px;
    background: var(--vt-dark-50, #f8fafc);
    border: 2px dashed var(--vt-dark-200, #e2e8f0);
    border-radius: 8px;
    text-align: center;
    color: var(--vt-dark-400, #94a3b8);
    font-size: 13px;
}

/* Collapse/Expand button */
.dd-collapse,
.dd-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    font-size: 10px;
    color: var(--vt-dark-500, #64748b);
    background: var(--vt-dark-100, #f1f5f9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.dd-collapse:hover,
.dd-expand:hover {
    background: var(--vt-dark-200, #e2e8f0);
    color: var(--vt-dark-700, #334155);
}

/* Collapsed state */
.dd-collapsed .dd-list {
    display: none;
}

/* Drag handle icon (optional - add before text) */
.dd-handle::before {
    content: '\f58e'; /* fa-grip-vertical */
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
    font-weight: 900;
    font-size: 10px;
    color: var(--vt-dark-300, #cbd5e1);
    margin-right: 10px;
    flex-shrink: 0;
}

/* Card wrapper styling */
.card .dd {
    padding: 10px;
}

/* ========================================
   Card Header & Toolbar
   ======================================== */
.card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    background: var(--vt-card-bg, #fff) !important;
    border-bottom: 1px solid var(--vt-dark-100, #f1f5f9) !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.card-header .card-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--vt-dark-800, #1e293b) !important;
    margin: 0 !important;
}

.card-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.btn-sm {
    padding: 8px 14px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

.btn-xs {
    padding: 6px 10px !important;
    font-size: 11px !important;
    border-radius: 5px !important;
}

/* Success Button */
.btn-success,
.btn.btn-success {
    background: var(--vt-success, #10b981) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
}

.btn-success:hover,
.btn.btn-success:hover {
    background: #059669 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    transform: translateY(-1px);
}

/* Primary Button */
.btn-primary {
    background: var(--vt-primary, #6366f1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    background: var(--vt-primary-dark, #4f46e5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background: var(--vt-danger, #ef4444);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

/* Secondary/Light Button */
.btn-secondary,
.btn-light {
    background: var(--vt-dark-100, #f1f5f9);
    color: var(--vt-dark-600, #475569);
    box-shadow: none;
}

.btn-secondary:hover,
.btn-light:hover {
    background: var(--vt-dark-200, #e2e8f0);
    color: var(--vt-dark-800, #1e293b);
}

/* Icon Button */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn-icon.btn-xs {
    width: 28px;
    height: 28px;
}

/* Responsive */
@media (max-width: 767px) {
    .dd-handle {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .dd-handle > div:first-child {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .dd-handle .badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .dd-list .dd-list {
        margin-left: 16px;
        padding-left: 10px;
    }

    .menu-item-buttons .btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .dd-handle::before {
        margin-right: 6px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .dd-handle {
        padding: 8px 10px;
    }

    .dd-handle > div:first-child {
        width: 100%;
    }

    .menu-item-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

.save-menu-button {
    width: auto!important;
    padding: 0 12px!important;
}
