/* ============================================================
   DarkHLS Pro Theme v2 — Light / White Mode
   Ref: DataPulse SaaS Analytics Dashboard
   Clean, Professional, Modern
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* Background */
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;
    --bg-sidebar: #ffffff;
    --bg-input: #f9fafb;
    --bg-hover: #f3f4f6;

    /* Accent */
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-primary-light: #eef2ff;
    --accent-primary-lighter: #e0e7ff;
    --accent-secondary: #06b6d4;
    --accent-success: #10b981;
    --accent-success-light: #ecfdf5;
    --accent-warning: #f59e0b;
    --accent-warning-light: #fffbeb;
    --accent-danger: #ef4444;
    --accent-danger-light: #fef2f2;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #f5f3ff;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-teal: #14b8a6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #06b6d4, #3b82f6);
    --gradient-success: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-danger: linear-gradient(135deg, #ef4444, #ec4899);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #ec4899);

    /* Text */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-light: #d1d5db;
    --text-accent: #6366f1;

    /* Border */
    --border-default: #e5e7eb;
    --border-light: #f3f4f6;
    --border-hover: #d1d5db;
    --border-accent: rgba(99, 102, 241, 0.3);

    /* Shadow */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --shadow-primary: 0 4px 14px rgba(99, 102, 241, 0.25);

    /* Layout */
    --sidebar-width: 272px;
    --header-height: 68px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

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

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.darkhls-theme {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6,
.dh-heading {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--text-primary);
}

.dh-text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dh-text-sm {
    font-size: 0.8125rem;
}

.dh-text-xs {
    font-size: 0.75rem;
}

.dh-text-lg {
    font-size: 1.125rem;
}

.dh-text-xl {
    font-size: 1.25rem;
}

.dh-text-2xl {
    font-size: 1.5rem;
}

.dh-text-3xl {
    font-size: 1.875rem;
}

.dh-text-4xl {
    font-size: 2.25rem;
}

.dh-text-muted {
    color: var(--text-muted);
}

.dh-text-secondary {
    color: var(--text-secondary);
}

/* --- Layout --- */
.dh-app {
    display: flex;
    min-height: 100vh;
}

/* ============================
   SIDEBAR
   ============================ */
.dh-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-base), transform var(--transition-base);
    overflow: hidden;
}

.dh-sidebar-logo {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    height: var(--header-height);
}

.dh-sidebar-logo img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.dh-sidebar-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.dh-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.dh-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.dh-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.dh-sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

.dh-nav-section {
    margin-bottom: 20px;
}

.dh-nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 12px;
    margin-bottom: 6px;
}

.dh-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    white-space: nowrap;
    cursor: pointer;
}

.dh-nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.dh-nav-item.active {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    font-weight: 600;
}

.dh-nav-item .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.dh-nav-item .nav-badge {
    margin-left: auto;
    background: var(--accent-danger);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    line-height: 1.4;
}

.dh-sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.dh-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dh-user-card:hover {
    background: var(--bg-hover);
}

.dh-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    color: #fff;
    flex-shrink: 0;
}

.dh-user-info {
    flex: 1;
    min-width: 0;
}

.dh-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dh-user-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ============================
   MAIN CONTENT
   ============================ */
.dh-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

/* ============================
   HEADER
   ============================ */
.dh-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.dh-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dh-header-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dh-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dh-header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    position: relative;
}

.dh-header-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

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

.dh-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-gray-50);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    width: 260px;
    transition: all var(--transition-fast);
}

.dh-search-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-white);
}

.dh-search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.8125rem;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.dh-search-bar input::placeholder {
    color: var(--text-muted);
}

/* ============================
   CONTENT AREA
   ============================ */
.dh-content {
    padding: 28px 32px;
}

/* ============================
   CARDS
   ============================ */
.dh-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    position: relative;
}

.dh-card:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-default);
}

.dh-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dh-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dh-card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================
   STAT CARDS
   ============================ */
.dh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.dh-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.dh-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

/* Top accent stripe */
.dh-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dh-stat-card.stat-primary::before {
    background: var(--gradient-primary);
}

.dh-stat-card.stat-secondary::before {
    background: var(--gradient-secondary);
}

.dh-stat-card.stat-success::before {
    background: var(--gradient-success);
}

.dh-stat-card.stat-warning::before {
    background: var(--gradient-warning);
}

.dh-stat-card.stat-purple::before {
    background: var(--gradient-purple);
}

.dh-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dh-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.dh-stat-icon.icon-primary {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.dh-stat-icon.icon-secondary {
    background: #ecfeff;
    color: var(--accent-secondary);
}

.dh-stat-icon.icon-success {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.dh-stat-icon.icon-warning {
    background: var(--accent-warning-light);
    color: var(--accent-warning);
}

.dh-stat-icon.icon-danger {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

.dh-stat-icon.icon-purple {
    background: var(--accent-purple-light);
    color: var(--accent-purple);
}

.dh-stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dh-stat-change.up {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.dh-stat-change.down {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

.dh-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.dh-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================
   PROGRESS BAR
   ============================ */
.dh-progress {
    height: 5px;
    background: var(--bg-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 12px;
}

.dh-progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
   GRID LAYOUTS
   ============================ */
.dh-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dh-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dh-grid-7-5 {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 20px;
}

/* ============================
   TABLE
   ============================ */
.dh-table-wrap {
    overflow-x: auto;
}

.dh-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.dh-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-default);
    text-align: left;
    white-space: nowrap;
    background: var(--bg-gray-50);
}

.dh-table thead th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.dh-table thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

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

.dh-table tbody tr:hover {
    background: var(--bg-gray-50);
}

.dh-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================
   BADGES
   ============================ */
.dh-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

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

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

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

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

.dh-badge-info {
    background: #ecfeff;
    color: var(--accent-secondary);
}

.dh-badge-purple {
    background: var(--accent-purple-light);
    color: var(--accent-purple);
}

.dh-badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ============================
   BUTTONS
   ============================ */
.dh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.dh-btn:active {
    transform: scale(0.97);
}

.dh-btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.dh-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.dh-btn-outline-primary {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.dh-btn-outline-primary:hover {
    background: var(--accent-primary-light);
}

.dh-btn-secondary {
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
}

.dh-btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.dh-btn-success {
    background: var(--gradient-success);
    color: #fff;
}

.dh-btn-danger {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.dh-btn-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.dh-btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.dh-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ============================
   FORMS
   ============================ */
.dh-form-group {
    margin-bottom: 20px;
}

.dh-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.dh-form-control {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
    outline: none;
}

.dh-form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dh-form-control::placeholder {
    color: var(--text-muted);
}

/* ============================
   ACTIVITY FEED
   ============================ */
.dh-activity-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.dh-activity-item:last-child {
    border-bottom: none;
}

.dh-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    position: relative;
}

.dh-activity-dot::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 16px);
    background: var(--border-light);
}

.dh-activity-item:last-child .dh-activity-dot::after {
    display: none;
}

.dh-activity-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.dh-activity-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ============================
   CHART
   ============================ */
.dh-chart-area {
    width: 100%;
    min-height: 300px;
    border-radius: var(--radius-md);
}

/* ============================
   MOBILE TOGGLE
   ============================ */
.dh-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

.dh-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

/* ============================
   ANIMATIONS
   ============================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dh-animate-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

.dh-animate-in-1 {
    animation-delay: 0.04s;
    opacity: 0;
}

.dh-animate-in-2 {
    animation-delay: 0.08s;
    opacity: 0;
}

.dh-animate-in-3 {
    animation-delay: 0.12s;
    opacity: 0;
}

.dh-animate-in-4 {
    animation-delay: 0.16s;
    opacity: 0;
}

.dh-animate-in-5 {
    animation-delay: 0.20s;
    opacity: 0;
}

/* ============================
   STATUS DOT
   ============================ */
.dh-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dh-status-dot.online {
    background: var(--accent-success);
    box-shadow: 0 0 6px var(--accent-success);
}

.dh-status-dot.offline {
    background: var(--text-muted);
}

.dh-status-dot.processing {
    background: var(--accent-warning);
    box-shadow: 0 0 6px var(--accent-warning);
}

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {

    .dh-grid-7-5,
    .dh-grid-3,
    .dh-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dh-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .dh-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .dh-sidebar-overlay.active {
        display: block;
    }

    .dh-main {
        margin-left: 0;
    }

    .dh-mobile-toggle {
        display: flex;
    }

    .dh-header {
        padding: 0 16px;
    }

    .dh-content {
        padding: 20px 16px;
    }

    .dh-stats-grid {
        grid-template-columns: 1fr;
    }

    .dh-search-bar {
        display: none;
    }
}

/* ============================
   LOGIN PAGE — Light
   ============================ */
.dh-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.dh-login-page::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    top: -300px;
    right: -300px;
    pointer-events: none;
}

.dh-login-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.04) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    pointer-events: none;
}

.dh-login-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
}

.dh-login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.dh-login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.dh-login-logo img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.dh-login-logo h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dh-login-logo p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.dh-login-form .dh-form-group {
    position: relative;
}

.dh-login-form .dh-form-control {
    padding: 13px 16px 13px 46px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: var(--bg-gray-50);
    border: 1px solid var(--border-default);
}

.dh-login-form .dh-form-control:focus {
    background: var(--bg-white);
}

.dh-login-form .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.dh-login-btn {
    width: 100%;
    padding: 13px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    margin-top: 8px;
}

/* ============================
   UTILITIES
   ============================ */
.dh-flex {
    display: flex;
}

.dh-items-center {
    align-items: center;
}

.dh-justify-between {
    justify-content: space-between;
}

.dh-gap-2 {
    gap: 8px;
}

.dh-gap-3 {
    gap: 12px;
}

.dh-gap-4 {
    gap: 16px;
}

.dh-gap-5 {
    gap: 20px;
}

.dh-mb-4 {
    margin-bottom: 16px;
}

.dh-mb-5 {
    margin-bottom: 20px;
}

.dh-mb-6 {
    margin-bottom: 24px;
}

.dh-mt-4 {
    margin-top: 16px;
}

.dh-w-full {
    width: 100%;
}

.dh-text-center {
    text-align: center;
}

.dh-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   LEGACY BOOTSTRAP / METRONIC OVERRIDES
   Restyle all existing pages without changing blade templates
   ============================================================ */

/* --- Card --- */
body.darkhls-theme .card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    overflow: visible;
}

body.darkhls-theme .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

body.darkhls-theme .card-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

body.darkhls-theme .card-body {
    padding: 24px;
}

body.darkhls-theme .card-footer {
    background: var(--bg-gray-50);
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* --- Form Controls --- */
body.darkhls-theme .form-control {
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    padding: 10px 14px;
    transition: all var(--transition-fast);
    outline: none;
    box-shadow: none;
    height: auto;
}

body.darkhls-theme .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-white);
}

body.darkhls-theme .form-control::placeholder {
    color: var(--text-muted);
}

body.darkhls-theme select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

body.darkhls-theme textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

body.darkhls-theme .col-form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

body.darkhls-theme .form-group {
    margin-bottom: 16px;
}

/* --- Buttons --- */
body.darkhls-theme .btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    padding: 8px 18px;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    line-height: 1.5;
}

body.darkhls-theme .btn:active {
    transform: scale(0.97);
}

body.darkhls-theme .btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
    border: none;
}

body.darkhls-theme .btn-primary:hover,
body.darkhls-theme .btn-primary:focus {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    color: #fff;
    background: var(--gradient-primary);
}

body.darkhls-theme .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    border: none;
}

body.darkhls-theme .btn-warning:hover {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
    color: #fff;
}

body.darkhls-theme .btn-info {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    border: none;
}

body.darkhls-theme .btn-info:hover {
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
    color: #fff;
}

body.darkhls-theme .btn-success {
    background: var(--gradient-success);
    color: #fff;
    border: none;
}

body.darkhls-theme .btn-success:hover {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    color: #fff;
}

body.darkhls-theme .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
}

body.darkhls-theme .btn-danger:hover {
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    color: #fff;
}

body.darkhls-theme .btn-secondary,
body.darkhls-theme .btn-light,
body.darkhls-theme .btn-outline-primary,
body.darkhls-theme .btn-light-primary {
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
}

body.darkhls-theme .btn-secondary:hover,
body.darkhls-theme .btn-light:hover,
body.darkhls-theme .btn-outline-primary:hover,
body.darkhls-theme .btn-light-primary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

body.darkhls-theme .btn-link {
    background: none;
    border: none;
    color: var(--accent-primary);
    padding: 4px 8px;
    font-weight: 500;
    text-decoration: none;
}

body.darkhls-theme .btn-link:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

body.darkhls-theme .btn-sm {
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

body.darkhls-theme .btn.disabled,
body.darkhls-theme .btn[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Tables --- */
body.darkhls-theme .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
}

body.darkhls-theme .table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--border-default);
    background: var(--bg-gray-50);
    white-space: nowrap;
    text-align: left;
}

body.darkhls-theme .table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

body.darkhls-theme .table tbody tr:hover {
    background: #f8faff;
}

body.darkhls-theme .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- Labels / Badges (Metronic) --- */
body.darkhls-theme .label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}

body.darkhls-theme .label-primary {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

body.darkhls-theme .label-secondary {
    background: var(--bg-gray-100);
    color: var(--text-secondary);
}

body.darkhls-theme .label-success {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

body.darkhls-theme .label-warning {
    background: var(--accent-warning-light);
    color: var(--accent-warning);
}

body.darkhls-theme .label-danger {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

body.darkhls-theme .label-info {
    background: #ecfeff;
    color: var(--accent-secondary);
}

/* --- Alerts --- */
body.darkhls-theme .alert {
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 0.875rem;
    border: 1px solid;
    margin-bottom: 16px;
}

body.darkhls-theme .alert-danger {
    background: var(--accent-danger-light);
    border-color: #fecaca;
    color: #dc2626;
}

body.darkhls-theme .alert-success {
    background: var(--accent-success-light);
    border-color: #a7f3d0;
    color: #059669;
}

body.darkhls-theme .alert-warning {
    background: var(--accent-warning-light);
    border-color: #fde68a;
    color: #b45309;
}

body.darkhls-theme .alert-info {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0891b2;
}

body.darkhls-theme .alert ul {
    margin: 0;
    padding-left: 18px;
}

/* --- Progress Bar (Bootstrap) --- */
body.darkhls-theme .progress {
    height: 8px;
    background: var(--bg-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: none;
}

body.darkhls-theme .progress-bar {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: width 0.4s ease;
}

/* --- Dropzone --- */
body.darkhls-theme .dropzone {
    background: var(--bg-gray-50);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    min-height: 100px;
}

body.darkhls-theme .dropzone:hover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}

body.darkhls-theme .dropzone-msg-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

body.darkhls-theme .dropzone-msg-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

body.darkhls-theme .dz-preview {
    margin: 10px;
}

/* --- Modal --- */
body.darkhls-theme .modal-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

body.darkhls-theme .modal-header {
    background: var(--bg-gray-50);
    border-bottom: 1px solid var(--border-light);
    padding: 18px 24px;
}

body.darkhls-theme .modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

body.darkhls-theme .modal-body {
    padding: 24px;
}

body.darkhls-theme .modal-footer {
    background: var(--bg-gray-50);
    border-top: 1px solid var(--border-light);
    padding: 14px 24px;
}

body.darkhls-theme .modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

body.darkhls-theme .close {
    color: var(--text-muted);
    opacity: 0.7;
    font-size: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
}

body.darkhls-theme .close:hover {
    opacity: 1;
    color: var(--text-primary);
}

/* --- Pagination --- */
body.darkhls-theme .pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 16px 0;
    margin: 0;
    flex-wrap: wrap;
}

body.darkhls-theme .pagination li {
    list-style: none;
}

body.darkhls-theme .pagination .page-link,
body.darkhls-theme .pagination li a,
body.darkhls-theme .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    text-decoration: none;
    transition: all var(--transition-fast);
}

body.darkhls-theme .pagination .page-item.active .page-link,
body.darkhls-theme .pagination li.active a,
body.darkhls-theme .pagination li.active span {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

body.darkhls-theme .pagination .page-link:hover,
body.darkhls-theme .pagination li a:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    border-color: var(--border-hover);
}

body.darkhls-theme .pagination .page-item.disabled .page-link,
body.darkhls-theme .pagination li.disabled span {
    opacity: 0.4;
    pointer-events: none;
}

/* --- Radio & Checkbox (Metronic) --- */
body.darkhls-theme .radio,
body.darkhls-theme .checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 0;
}

body.darkhls-theme .radio input[type="radio"],
body.darkhls-theme .checkbox input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

body.darkhls-theme .radio-inline {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- Select2 Override --- */
body.darkhls-theme .select2-container--default .select2-selection--single {
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    height: 42px;
    padding: 6px 12px;
}

body.darkhls-theme .select2-container--default .select2-selection--single:focus,
body.darkhls-theme .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body.darkhls-theme .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 28px;
}

body.darkhls-theme .select2-dropdown {
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
}

body.darkhls-theme .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

/* --- Code / Textarea embed --- */
body.darkhls-theme code {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

body.darkhls-theme .coppy_id2 {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
    background: var(--bg-gray-50);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
    resize: none;
}

body.darkhls-theme .coppy_id3 {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
}

/* --- HR --- */
body.darkhls-theme hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

/* --- Image styling in tables --- */
body.darkhls-theme .table img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

/* --- SweetAlert2 Overrides --- */
body.darkhls-theme .swal2-popup {
    border-radius: var(--radius-xl) !important;
    font-family: 'Inter', sans-serif !important;
}

body.darkhls-theme .swal2-confirm {
    border-radius: var(--radius-md) !important;
    background: var(--gradient-primary) !important;
    font-weight: 600 !important;
}

/* --- Tooltip / Dropdown general --- */
body.darkhls-theme .dropdown-menu {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
}

body.darkhls-theme .dropdown-item {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

body.darkhls-theme .dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* --- Row spacing fix --- */
body.darkhls-theme .row {
    --bs-gutter-x: 1.25rem;
}

/* --- Center tag (legacy) --- */
body.darkhls-theme center {
    text-align: center;
}

/* --- Helper Classes --- */
body.darkhls-theme .text-lg-right {
    text-align: right;
}

body.darkhls-theme .mb-2 {
    margin-bottom: 0.5rem;
}

body.darkhls-theme .mb-3 {
    margin-bottom: 1rem;
}

body.darkhls-theme .mt-3 {
    margin-top: 1rem;
}

/* --- Links --- */
body.darkhls-theme a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

body.darkhls-theme a:hover {
    color: var(--accent-primary-hover);
}

/* Exception: nav items and buttons should not get link color */
body.darkhls-theme .dh-nav-item,
body.darkhls-theme .btn,
body.darkhls-theme .dh-btn,
body.darkhls-theme .dh-user-card {
    color: inherit;
}

body.darkhls-theme .dh-nav-item:hover {
    color: var(--text-primary);
}

body.darkhls-theme .dh-nav-item.active {
    color: var(--accent-primary);
}

/* Notification badge on metronic header */
body.darkhls-theme .navi-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}

body.darkhls-theme .navi-item {
    display: block;
    text-decoration: none;
}

body.darkhls-theme .separator-solid {
    border-bottom: 1px solid var(--border-light);
}

/* --- Copy button styles --- */
body.darkhls-theme .coppy_id {
    cursor: pointer;
    color: var(--accent-primary);
}

/* ============================
   ACTION BUTTONS (Table Actions)
   ============================ */
.dh-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
}

.dh-action-btn i {
    font-size: 0.7rem;
}

.dh-action-btn:active {
    transform: scale(0.95);
}

/* View Detail - Indigo */
.dh-action-view {
    background: #eef2ff;
    color: #4f46e5 !important;
    border-color: #e0e7ff;
}

.dh-action-view:hover {
    background: #4f46e5;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Post to WP - Slate */
.dh-action-wp {
    background: #f1f5f9;
    color: #475569 !important;
    border-color: #e2e8f0;
}

.dh-action-wp:hover {
    background: #475569;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.25);
}

/* Preview Play - Emerald */
.dh-action-play {
    background: #ecfdf5;
    color: #059669 !important;
    border-color: #d1fae5;
}

.dh-action-play:hover {
    background: #059669;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

/* Convert HLS - Amber */
.dh-action-convert {
    background: #fffbeb;
    color: #b45309 !important;
    border-color: #fef3c7;
}

.dh-action-convert:hover {
    background: #b45309;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

/* Delete - Rose */
.dh-action-delete {
    background: #fff1f2;
    color: #e11d48 !important;
    border-color: #ffe4e6;
}

.dh-action-delete:hover {
    background: #e11d48;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

/* Disabled state */
.dh-action-btn.disabled,
.dh-action-btn[disabled] {
    opacity: 0.4;
    pointer-events: none;
}