/* ============================================================
   Ownet / Heimdall v3 — Custom Styles
   Built on top of Metronic v9.4.6 Tailwind CSS
   ============================================================ */

/* ── Hide number input spinners globally ─────────────────── */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* ============================================================
   Theme Color Overrides — Match old Heimdall v2 theme
   ============================================================ */

/* ── Light mode ────────────────────────────────────────────── */
:root {
    --background: #ffffff;
    --foreground: #071437;
    --card: #ffffff;
    --card-foreground: #071437;
    --popover: #ffffff;
    --popover-foreground: #071437;
    --primary: #1B84FF;
    --primary-foreground: #ffffff;
    --secondary: #F9F9F9;
    --secondary-foreground: #252F4A;
    --muted: #F1F1F4;
    --muted-foreground: #99A1B7;
    --accent: #F9F9F9;
    --accent-foreground: #252F4A;
    --destructive: #F8285A;
    --destructive-foreground: #ffffff;
    --mono: #071437;
    --mono-foreground: #ffffff;
    --border: #F1F1F4;
    --input: #F1F1F4;
    --ring: #C4CADA;
}

/* ── Dark mode ─────────────────────────────────────────────── */
.dark {
    --background: #15171C;
    --foreground: #F5F5F5;
    --card: #1E2027;
    --card-foreground: #F5F5F5;
    --popover: #1E2027;
    --popover-foreground: #F5F5F5;
    --primary: #006AE6;
    --primary-foreground: #ffffff;
    --secondary: #363843;
    --secondary-foreground: #F5F5F5;
    --muted: #15171C;
    --muted-foreground: #78829D;
    --accent: #252F4A;
    --accent-foreground: #F5F5F5;
    --destructive: #E42855;
    --destructive-foreground: #ffffff;
    --mono: #DBDFE9;
    --mono-foreground: #071437;
    --border: #26272F;
    --input: #26272F;
    --ring: #4B5675;
}

/* ── Body background — muted gray for content area contrast ── */
/* Light: #F1F1F4 (from --muted), Dark: #1E2027 (from --muted) */
/* Body uses bg-muted class, which picks up --muted variable above */

/* ============================================================
   Container — Full width content area
   ============================================================ */
.kt-container-fixed {
    max-width: 100% !important;
}

/* ============================================================
   Card Styling — Visible separation in dark mode
   ============================================================ */
.kt-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Dark mode: lighter border so cards are clearly separated */
.dark .kt-card {
    border-color: #363843;
}
.kt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
}
.dark .kt-card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
    border-color: #4B5675;
}

/* ============================================================
   Sidebar — Match old Heimdall theme colors
   ============================================================ */

/* Sidebar background — dark in both modes (like old theme) */
.demo1 .kt-sidebar {
    background-color: #1C1F26;
    border-right-color: #26272F;
}
.dark .demo1 .kt-sidebar,
.demo1.dark .kt-sidebar {
    background-color: #111318;
    border-right-color: #1E2027;
}

/* Sidebar header — logo area */
.demo1 .kt-sidebar .kt-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Sidebar menu headings */
.demo1 .kt-sidebar .kt-menu-heading {
    color: #78829D !important;
}

/* Sidebar menu item text — light gray on dark bg */
.demo1 .kt-sidebar .kt-menu-title {
    color: #C4CADA !important;
}
.demo1 .kt-sidebar .kt-menu-link:hover .kt-menu-title {
    color: #ffffff !important;
}

/* Sidebar menu icons */
.demo1 .kt-sidebar .kt-menu-icon {
    color: #78829D !important;
}
.demo1 .kt-sidebar .kt-menu-link:hover .kt-menu-icon {
    color: #ffffff !important;
}

/* Sidebar menu arrows (+ / -) */
.demo1 .kt-sidebar .kt-menu-arrow {
    color: #78829D !important;
}

/* Sidebar active menu item */
.demo1 .kt-sidebar .kt-menu-item.active > .kt-menu-link .kt-menu-title,
.demo1 .kt-sidebar .kt-menu-item.show > .kt-menu-link .kt-menu-title,
.demo1 .kt-sidebar .kt-menu-link.active .kt-menu-title {
    color: var(--primary) !important;
}
.demo1 .kt-sidebar .kt-menu-item.active > .kt-menu-link .kt-menu-icon,
.demo1 .kt-sidebar .kt-menu-item.show > .kt-menu-link .kt-menu-icon,
.demo1 .kt-sidebar .kt-menu-link.active .kt-menu-icon {
    color: var(--primary) !important;
}

/* Sidebar sub-item active */
.demo1 .kt-sidebar .kt-menu-accordion .kt-menu-link.active {
    background-color: rgba(255, 255, 255, 0.04) !important;
}
.demo1 .kt-sidebar .kt-menu-accordion .kt-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Sidebar accordion vertical line */
.demo1 .kt-sidebar .kt-menu-accordion::before,
.demo1 .kt-sidebar .kt-menu-accordion[class*="before:border-s"] {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

/* Sidebar sub-item bullet dot */
.demo1 .kt-sidebar .kt-menu-bullet::before {
    background-color: #78829D !important;
}
.demo1 .kt-sidebar .kt-menu-link.active .kt-menu-bullet::before {
    background-color: var(--primary) !important;
}
.demo1 .kt-sidebar .kt-menu-link:hover .kt-menu-bullet::before {
    background-color: var(--primary) !important;
}

/* Sidebar logo text */
.demo1 .kt-sidebar .default-logo {
    color: #ffffff !important;
}

/* Sidebar footer */
#sidebar_footer {
    border-top-color: rgba(255, 255, 255, 0.07) !important;
}
#sidebar_footer .user_fullname {
    color: #C4CADA !important;
}
#sidebar_footer .user_mail {
    color: #78829D !important;
}
#sidebar_footer .kt-btn {
    color: #78829D !important;
}
#sidebar_footer .kt-btn:hover {
    color: #ffffff !important;
}

/* Sidebar toggle button — visible on dark bg */
#sidebar_toggle {
    background-color: #1C1F26;
    border-color: #26272F;
    color: #C4CADA;
}
#sidebar_toggle:hover {
    background-color: #252F4A;
    color: #ffffff;
}
.dark #sidebar_toggle {
    background-color: #111318;
    border-color: #1E2027;
}

/* ============================================================
   Header — clean light/dark header
   ============================================================ */

/* Remove header bottom border by default (only show when sticky) */
.kt-header {
    border-bottom: none;
}

/* Progress bar animations */
#hw_progress_bar {
    background: linear-gradient(90deg, #009ef7, #50cd89, #009ef7);
    background-size: 200% auto;
    box-shadow: 0 0 10px rgba(0, 158, 247, 0.65), 0 0 4px rgba(80, 205, 137, 0.4);
}
@keyframes hw-bar-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}
#hw_progress_bar.hw-running {
    animation: hw-bar-shimmer 1.8s linear infinite;
}
#hw_progress_bar.hw-bar-success {
    background: #50CD89;
    box-shadow: 0 0 10px rgba(80, 205, 137, 0.7);
    animation: none;
}
#hw_progress_bar.hw-bar-error {
    background: var(--destructive);
    box-shadow: 0 0 10px rgba(241, 65, 108, 0.7);
    animation: none;
}

/* Loader chip states */
#hw_loader_chip .hw-chip-spinner { display: inline-block !important; }
#hw_loader_chip .hw-chip-icon-success { display: none !important; }
#hw_loader_chip .hw-chip-icon-error { display: none !important; }

#hw_loader_chip.hw-success {
    background: rgba(80, 205, 137, 0.95) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 20px rgba(80, 205, 137, 0.40) !important;
}
#hw_loader_chip.hw-success .hw-chip-spinner { display: none !important; }
#hw_loader_chip.hw-success .hw-chip-icon-success { display: inline-block !important; color: #fff !important; }

#hw_loader_chip.hw-error {
    background: rgba(241, 65, 108, 0.95) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 20px rgba(241, 65, 108, 0.40) !important;
}
#hw_loader_chip.hw-error .hw-chip-spinner { display: none !important; }
#hw_loader_chip.hw-error .hw-chip-icon-error { display: inline-block !important; color: #fff !important; }

/* Toast notifications (custom, no SweetAlert dependency) */
.hw-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.hw-toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    max-width: 360px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: hw-toast-in 0.3s ease forwards;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
}

.hw-toast.hw-toast-out {
    animation: hw-toast-out 0.3s ease forwards;
}

.hw-toast-success { border-left: 3px solid #50CD89; }
.hw-toast-error   { border-left: 3px solid var(--destructive); }
.hw-toast-warning { border-left: 3px solid #FFC700; }
.hw-toast-info    { border-left: 3px solid var(--primary); }

.hw-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes hw-toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes hw-toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* KPI Cards */
.hw-kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hw-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Notification items */
.hw-notif-item {
    transition: background-color 0.15s ease;
    border-radius: 8px;
    margin: 0 4px;
}
.hw-notif-item:hover {
    background-color: var(--accent);
}
.hw-notif-item.hw-notif-unread {
    border-left: 3px solid var(--primary);
}
.hw-notif-item.hw-notif-read {
    opacity: 0.6;
}

.hw-unread-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    margin-right: 6px;
    flex-shrink: 0;
}

/* Table styles for data tables */
.hw-table {
    width: 100%;
    border-collapse: collapse;
}
.hw-table thead th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.hw-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
}
.hw-table tbody tr:hover {
    background: var(--accent);
}
.hw-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge utility — now uses kt-badge from Metronic v9 */
/* All hw-badge classes migrated to kt-badge kt-badge-sm kt-badge-outline + color variant */

/* Skeleton loading */
.hw-skeleton {
    background: linear-gradient(90deg, var(--muted) 25%, var(--accent) 50%, var(--muted) 75%);
    background-size: 200% 100%;
    animation: hw-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes hw-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Lock/unlock for loading states — shimmer effect */
.hw-locked {
    pointer-events: none;
    position: relative;
    overflow: hidden;
}
.hw-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(
        90deg,
        transparent 0%,
        color-mix(in oklab, var(--background) 60%, transparent) 40%,
        color-mix(in oklab, var(--background) 80%, transparent) 50%,
        color-mix(in oklab, var(--background) 60%, transparent) 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: hw-shimmer 1.5s ease-in-out infinite;
    border-radius: inherit;
}
@keyframes hw-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Tab navigation ────────────────────────────────────────── */
[data-tab].active,
[data-tab][aria-selected="true"] {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

/* ── Fade-in animation for dynamic content ─────────────────── */
.hw-fade-in {
    animation: hw-fade-in 0.35s ease forwards;
}
@keyframes hw-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Kanban board layout ───────────────────────────────────── */
.hw-kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
}
.hw-kanban-column {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--muted);
    padding: 12px;
}
.hw-kanban-task {
    position: relative;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}
.hw-kanban-task:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: var(--primary);
}
.hw-kanban-task:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.hw-kanban-task.opacity-50 {
    opacity: 0.5;
    transform: scale(0.97);
}

/* ── Kanban drag-over column pulse ─────────────────────────── */
.pd-kanban-dropzone {
    transition: background-color 0.2s ease;
    border-radius: 8px;
}
.pd-kanban-dropzone.ring-2 {
    background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* ── Status dots ───────────────────────────────────────────── */
.hw-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hw-status-up    { background: #50CD89; }
.hw-status-down  { background: #F1416C; }
.hw-status-warn  { background: #FFC700; }
.hw-status-idle  { background: var(--muted-foreground); }

/* ── Infra service cards ───────────────────────────────────── */
.hw-service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hw-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.hw-service-card.hw-service-up {
    border-left: 3px solid #50CD89;
}
.hw-service-card.hw-service-down {
    border-left: 3px solid #F1416C;
}
.hw-service-card.hw-service-warn {
    border-left: 3px solid #FFC700;
}

/* ── Gauge / radial progress ───────────────────────────────── */
.hw-gauge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hw-gauge svg {
    transform: rotate(-90deg);
}
.hw-gauge-bg {
    fill: none;
    stroke: var(--muted);
    stroke-width: 6;
}
.hw-gauge-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}
.hw-gauge-label {
    position: absolute;
    font-size: 12px;
    font-weight: 700;
}

/* ── Scrollbar styling ─────────────────────────────────────── */
.hw-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.hw-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.hw-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.hw-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--muted-foreground);
}

/* ── Chevron rotation for expandable rows ──────────────────── */
.hw-chevron {
    transition: transform 0.2s ease;
}

/* ============================================================
   Login Page — Two-panel split layout
   ============================================================ */

/* Wrapper — fullscreen overlay */
.heimdall-login-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
}

/* Root — full viewport, two-column split on desktop */
.heimdall-login-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
@media (min-width: 1024px) {
    .heimdall-login-root {
        flex-direction: row;
    }
}

/* ── Left: Branded image panel ── */
.heimdall-login-branded {
    position: relative;
    background-image: url('/assets/media/auth/bg10.jpeg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    width: 100%;
}
@media (min-width: 1024px) {
    .heimdall-login-branded {
        width: 50%;
    }
}
.dark .heimdall-login-branded {
    background-image: url('/assets/media/auth/bg10-dark.jpeg');
}
/* Dark gradient overlay */
.heimdall-login-branded::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    pointer-events: none;
}
/* Content sits above overlay */
.heimdall-login-branded-content {
    position: relative;
    z-index: 1;
}

/* Logo — centered, large */
.heimdall-login-logo {
    height: 130px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

/* ── Right: Form panel ── */
.heimdall-login-form-panel {
    background-color: var(--background);
    width: 100%;
}
@media (min-width: 1024px) {
    .heimdall-login-form-panel {
        width: 50%;
    }
}

/* Form container with fade-in animation */
.heimdall-login-form {
    animation: heimdall-login-fade-in 0.5s ease both;
}

/* Input fields — solid background style */
.heimdall-login-input {
    background-color: var(--muted);
    border: 1px solid transparent;
    border-radius: 0.625rem;
    padding: 0.825rem 1rem;
    font-size: 0.95rem;
    color: var(--foreground);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    outline: none;
}
.heimdall-login-input:focus {
    border-color: var(--primary);
}
.heimdall-login-input::placeholder {
    color: var(--muted-foreground);
}

/* Footer */
.heimdall-login-footer {
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

/* ── Login loading overlay ── */
.heimdall-login-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.heimdall-login-loading.active {
    opacity: 1;
    pointer-events: auto;
}
.heimdall-login-loading-logo {
    height: 64px;
    animation: heimdall-login-pulse 2s ease-in-out infinite;
}
.heimdall-login-loading-logo-sso {
    height: 72px;
    filter: drop-shadow(0 2px 8px rgba(253, 75, 45, 0.3));
}
.heimdall-login-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: heimdall-login-spin 0.8s linear infinite;
}
.heimdall-login-loading.sso-mode .heimdall-login-loading-spinner {
    border-top-color: #fd4b2d;
}
.heimdall-login-loading-text {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Login animations */
@keyframes heimdall-login-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heimdall-login-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.7; transform: scale(0.96); }
}
@keyframes heimdall-login-spin {
    to { transform: rotate(360deg); }
}

/* Responsive — branded panel on mobile */
@media (max-width: 1023px) {
    .heimdall-login-branded {
        min-height: 280px;
    }
    .heimdall-login-form-panel {
        flex: 1;
    }
}

/* ============================================================
   Missing Tailwind Utility Classes
   These classes are used in HTML/JS but not present in the
   pre-compiled styles.css. Added manually here.
   ============================================================ */

/* ── orange-500 (warning color) ───────────────────────────── */
.text-orange-500 { color: oklch(70.5% 0.174 63.815); }
.bg-orange-500 { background-color: oklch(70.5% 0.174 63.815); }
.bg-orange-500\/5 { background-color: oklch(70.5% 0.174 63.815 / 0.05); }
.bg-orange-500\/10 { background-color: oklch(70.5% 0.174 63.815 / 0.1); }
.bg-orange-500\/20 { background-color: oklch(70.5% 0.174 63.815 / 0.2); }
.border-orange-500 { border-color: oklch(70.5% 0.174 63.815); }

/* ── blue-500 ─────────────────────────────────────────────── */
.text-blue-500 { color: oklch(62.3% 0.214 259.815); }
.bg-blue-500 { background-color: oklch(62.3% 0.214 259.815); }
.bg-blue-500\/5 { background-color: oklch(62.3% 0.214 259.815 / 0.05); }
.bg-blue-500\/10 { background-color: oklch(62.3% 0.214 259.815 / 0.1); }

/* ── blue-400 ─────────────────────────────────────────────── */
.text-blue-400 { color: oklch(70.7% 0.165 254.624); }
.bg-blue-400 { background-color: oklch(70.7% 0.165 254.624); }
.bg-blue-400\/10 { background-color: oklch(70.7% 0.165 254.624 / 0.1); }
.border-blue-400 { border-color: oklch(70.7% 0.165 254.624); }

/* ── green-500 opacity variants ───────────────────────────── */
.bg-green-500\/5 { background-color: oklch(72.3% 0.219 149.579 / 0.05); }
.bg-green-500\/10 { background-color: oklch(72.3% 0.219 149.579 / 0.1); }
.bg-green-500\/20 { background-color: oklch(72.3% 0.219 149.579 / 0.2); }

/* ── indigo-500 ───────────────────────────────────────────── */
.text-indigo-500 { color: oklch(58.5% 0.233 277.117); }
.bg-indigo-500 { background-color: oklch(58.5% 0.233 277.117); }
.bg-indigo-500\/10 { background-color: oklch(58.5% 0.233 277.117 / 0.1); }

/* ── purple-500 ───────────────────────────────────────────── */
.text-purple-500 { color: oklch(62.7% 0.265 303.9); }
.bg-purple-500 { background-color: oklch(62.7% 0.265 303.9); }
.bg-purple-500\/10 { background-color: oklch(62.7% 0.265 303.9 / 0.1); }

/* ── destructive opacity variants ─────────────────────────── */
.bg-destructive\/10 { background-color: color-mix(in oklab, var(--destructive) 10%, transparent); }
.bg-destructive\/20 { background-color: color-mix(in oklab, var(--destructive) 20%, transparent); }

/* ── gray shades ──────────────────────────────────────────── */
.bg-gray-500\/10 { background-color: oklch(55.1% 0.027 264.364 / 0.1); }
.bg-gray-900 { background-color: oklch(21% 0.006 285.885); }
.text-gray-100 { color: oklch(92.8% 0.006 264.531); }

/* ── primary opacity variants ─────────────────────────────── */
.bg-primary\/5 { background-color: color-mix(in oklab, var(--primary) 5%, transparent); }

/* ── info aliases (map to primary for KTUI compat) ────────── */
.bg-info\/5 { background-color: color-mix(in oklab, var(--primary) 5%, transparent); }
.bg-info\/30 { background-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.border-info\/30 { border-color: color-mix(in oklab, var(--primary) 30%, transparent); }

/* ── Missing max-width utilities ──────────────────────────── */
.max-w-\[650px\] { max-width: 650px; }
.max-w-md { max-width: 28rem; }

/* ── Missing margin utility ───────────────────────────────── */
.mb-6 { margin-bottom: calc(var(--spacing, 0.25rem) * 6); }

/* ── Missing grid-cols base ───────────────────────────────── */
.grid-cols-5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* ── Missing grid-cols responsive (sm:) ───────────────────── */
@media (min-width: 40rem) {
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Missing grid-cols responsive (md:) ───────────────────── */
@media (min-width: 48rem) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .md\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* ── Missing grid-cols responsive (lg:) ───────────────────── */
@media (min-width: 64rem) {
    .lg\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

/* ── Missing grid-cols responsive (xl:) ───────────────────── */
@media (min-width: 80rem) {
    .xl\:grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

/* ── Missing col-span utilities (base) ────────────────────── */
.col-span-3    { grid-column: span 3 / span 3; }
.col-span-4    { grid-column: span 4 / span 4; }
.col-span-5    { grid-column: span 5 / span 5; }
.col-span-6    { grid-column: span 6 / span 6; }
.col-span-7    { grid-column: span 7 / span 7; }
.col-span-8    { grid-column: span 8 / span 8; }
.col-span-9    { grid-column: span 9 / span 9; }
.col-span-12   { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

/* ── Missing responsive col-span (md:) ────────────────────── */
@media (min-width: 48rem) {
    .md\:col-span-1 { grid-column: span 1 / span 1; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:col-span-3 { grid-column: span 3 / span 3; }
    .md\:col-span-4 { grid-column: span 4 / span 4; }
}

/* ── Missing responsive col-span (lg:) ────────────────────── */
@media (min-width: 64rem) {
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-6 { grid-column: span 6 / span 6; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

/* ── Missing responsive col-span (xl:) ────────────────────── */
@media (min-width: 80rem) {
    .xl\:col-span-1 { grid-column: span 1 / span 1; }
    .xl\:col-span-2 { grid-column: span 2 / span 2; }
    .xl\:col-span-3 { grid-column: span 3 / span 3; }
    .xl\:col-span-4 { grid-column: span 4 / span 4; }
    .xl\:col-span-5 { grid-column: span 5 / span 5; }
    .xl\:col-span-6 { grid-column: span 6 / span 6; }
    .xl\:col-span-7 { grid-column: span 7 / span 7; }
    .xl\:col-span-8 { grid-column: span 8 / span 8; }
    .xl\:col-span-9 { grid-column: span 9 / span 9; }
}

/* ── Missing button variants ──────────────────────────────── */
.kt-btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}
.kt-btn-primary:hover {
    background-color: color-mix(in oklab, var(--primary) 90%, transparent);
}
.kt-btn-success {
    background-color: #50CD89;
    color: #ffffff;
}
.kt-btn-success:hover {
    background-color: #47b97b;
}
.kt-btn-info {
    background-color: oklch(62.3% 0.214 259.815);
    color: #ffffff;
}
.kt-btn-info:hover {
    background-color: oklch(56% 0.214 259.815);
}
.kt-btn-danger {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}
.kt-btn-danger:hover {
    background-color: color-mix(in oklab, var(--destructive) 90%, transparent);
}
.kt-btn-warning {
    background-color: #FFC700;
    color: #1a1a1a;
}
.kt-btn-warning:hover {
    background-color: #e6b300;
}
.kt-btn-light {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}
.kt-btn-light:hover {
    background-color: var(--muted);
}

/* ============================================================
   Toolbar — Page-specific controls area
   ============================================================ */
.hw-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--muted);
    padding: 0.35rem 0.75rem;
    border-radius: 0.475rem;
    font-size: 0.8125rem;
}
.dark .hw-toolbar-group {
    background-color: rgba(255, 255, 255, 0.05);
}
.hw-toolbar-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    white-space: nowrap;
}
.hw-toolbar-group select,
.hw-toolbar-group input {
    font-size: 0.8125rem;
    min-width: 140px;
}
/* Toolbar Select2: larger for header context */
.hw-toolbar-group .select2-container .select2-selection--single {
    height: 38px !important;
    font-size: 0.8125rem !important;
    padding: 0 32px 0 0.75rem !important;
}
.hw-toolbar-group .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}
.hw-toolbar-group .select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}
.hw-toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.5rem;
}

/* ============================================================
   Flatpickr Theme Override — Match KTUI dark/light styling
   ============================================================ */
.flatpickr-input {
    cursor: pointer;
}

/* Calendar container */
.flatpickr-calendar {
    border-radius: var(--radius-lg, 0.5rem);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: var(--background);
    color: var(--foreground);
    padding: 4px;
    width: 308px;
}
.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after,
.flatpickr-calendar.arrowBottom::before,
.flatpickr-calendar.arrowBottom::after {
    display: none;
}

/* Month header */
.flatpickr-months {
    background: var(--background);
}
.flatpickr-months .flatpickr-month {
    background: var(--background);
    color: var(--foreground);
    height: 40px;
}
.flatpickr-current-month {
    color: var(--foreground);
    font-weight: 600;
    font-size: 0.9375rem;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--background);
    color: var(--foreground);
    border: none;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: var(--background);
    color: var(--foreground);
}
.flatpickr-current-month input.cur-year {
    color: var(--foreground);
    font-weight: 600;
}

/* Nav arrows */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--muted-foreground);
    fill: var(--muted-foreground);
    padding: 8px;
    border-radius: var(--radius, 0.375rem);
    transition: background 0.15s, color 0.15s;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--foreground);
    fill: var(--foreground);
    background: var(--muted);
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 14px;
    height: 14px;
}

/* Inner container & days */
.flatpickr-innerContainer {
    background: var(--background);
}
.flatpickr-rContainer {
    background: var(--background);
}

/* Weekday headers */
span.flatpickr-weekday {
    background: var(--background);
    color: var(--muted-foreground);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.dayContainer {
    background: var(--background);
}

/* Day cells */
.flatpickr-day {
    color: var(--foreground);
    border-radius: var(--radius, 0.375rem);
    border-color: transparent;
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 38px;
    height: 38px;
    max-width: 38px;
    transition: background 0.15s, color 0.15s;
}
.flatpickr-day:hover {
    background: var(--muted);
    border-color: var(--muted);
}
.flatpickr-day.today {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}
.flatpickr-day.today:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
    font-weight: 600;
}
.flatpickr-day.inRange {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: transparent;
    box-shadow: none;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--muted-foreground);
    opacity: 0.4;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: var(--muted-foreground);
    opacity: 0.3;
}

/* Dark mode specific shadows */
.dark .flatpickr-calendar {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Time picker */
.flatpickr-time {
    background: var(--background);
    border-top: 1px solid var(--border);
}
.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    color: var(--foreground);
    background: var(--background);
    font-weight: 600;
}
.flatpickr-time input:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:hover {
    background: var(--muted);
}
.numInputWrapper:hover {
    background: var(--muted);
}
.numInputWrapper span {
    border-color: var(--border);
}
.numInputWrapper span:hover {
    background: var(--muted);
}
.numInputWrapper span svg path {
    fill: var(--muted-foreground);
}

/* ============================================================
   Select2 Theme Override — Match KTUI styling
   ============================================================ */
.select2-container {
    font-family: inherit;
}

/* ── Selection box (single) ────────────────────────────────── */
.select2-container .select2-selection--single {
    background-color: var(--background) !important;
    border: 1px solid var(--input) !important;
    border-radius: var(--radius, 0.375rem) !important;
    box-sizing: border-box !important;
    height: 34px !important;
    padding: 0 32px 0 0.65rem !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    outline: none !important;
}
.select2-container .select2-selection--single:hover {
    border-color: var(--ring) !important;
}

/* ── Rendered text inside single selection ─────────────────── */
.select2-container .select2-selection--single .select2-selection__rendered {
    color: var(--foreground) !important;
    font-size: 0.8125rem !important;
    line-height: 32px !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ── Placeholder text ──────────────────────────────────────── */
.select2-container .select2-selection--single .select2-selection__placeholder {
    color: var(--muted-foreground) !important;
}

/* ── Dropdown arrow ────────────────────────────────────────── */
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    width: 28px !important;
    right: 2px !important;
    top: 0 !important;
}
.select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: var(--muted-foreground) transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    margin-left: -4px !important;
    margin-top: -2px !important;
}

/* ── Open state ────────────────────────────────────────────── */
.select2-container--open .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 15%, transparent) !important;
}
.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--muted-foreground) transparent !important;
    border-width: 0 4px 5px 4px !important;
}

/* ── Disabled state ────────────────────────────────────────── */
.select2-container--disabled .select2-selection--single {
    background-color: var(--muted) !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ── Multi-select ──────────────────────────────────────────── */
.select2-container .select2-selection--multiple {
    background-color: var(--background) !important;
    border: 1px solid var(--input) !important;
    border-radius: var(--radius, 0.375rem) !important;
    min-height: 34px !important;
    padding: 2px 4px !important;
    cursor: text !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.select2-container--open .select2-selection--multiple {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 15%, transparent) !important;
}
.select2-container .select2-selection--multiple .select2-selection__choice {
    background: color-mix(in oklab, var(--primary) 12%, transparent) !important;
    color: var(--primary) !important;
    border: none !important;
    border-radius: var(--radius-sm, 0.25rem) !important;
    font-size: 0.75rem !important;
    padding: 2px 6px !important;
    margin: 2px !important;
}
.select2-container .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--primary) !important;
    border: none !important;
    margin-right: 4px !important;
}
.select2-container .select2-selection--multiple .select2-search__field {
    color: var(--foreground) !important;
    font-size: 0.8125rem !important;
}
.select2-container .select2-selection--multiple .select2-search__field::placeholder {
    color: var(--muted-foreground) !important;
}

/* ── Dropdown panel ────────────────────────────────────────── */
.select2-dropdown {
    background-color: var(--background) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius, 0.375rem) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    color: var(--foreground) !important;
    font-size: 0.8125rem !important;
    z-index: 9998 !important;
    overflow: hidden !important;
}
.dark .select2-dropdown {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* ── Search box inside dropdown ────────────────────────────── */
.select2-container .select2-search--dropdown {
    padding: 6px 8px !important;
}
.select2-container .select2-search--dropdown .select2-search__field {
    background-color: var(--background) !important;
    border: 1px solid var(--input) !important;
    border-radius: var(--radius-sm, 0.25rem) !important;
    color: var(--foreground) !important;
    font-size: 0.8125rem !important;
    padding: 6px 8px !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.select2-container .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 15%, transparent) !important;
}

/* ── Dropdown results ──────────────────────────────────────── */
.select2-results__options {
    max-height: 240px !important;
    overflow-y: auto !important;
    padding: 4px 0 !important;
}
.select2-container--default .select2-results__option {
    padding: 7px 10px !important;
    color: var(--foreground) !important;
    background-color: transparent !important;
    cursor: pointer !important;
    transition: background-color 0.1s ease !important;
    font-size: 0.8125rem !important;
}
.select2-container--default .select2-results__option--disabled {
    cursor: default !important;
    color: var(--muted-foreground) !important;
}
.select2-container--default .select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--accent) !important;
    color: var(--accent-foreground) !important;
}
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--selected {
    background-color: color-mix(in oklab, var(--primary) 15%, transparent) !important;
    color: var(--primary) !important;
    font-weight: 500 !important;
}
.select2-results__option--group {
    padding: 0 !important;
}
.select2-results__group {
    color: var(--muted-foreground) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 6px 10px 4px !important;
}

/* ── "No results" message ──────────────────────────────────── */
.select2-results__message {
    padding: 7px 10px !important;
    color: var(--muted-foreground) !important;
    font-style: italic !important;
}

/* ── Clear button ──────────────────────────────────────────── */
.select2-container .select2-selection__clear {
    color: var(--muted-foreground) !important;
    font-size: 1rem !important;
    margin-right: 4px !important;
}

/* ── Inline select variant (smaller, borderless, for tables) ── */
.hw-inline-select-wrap .select2-container .select2-selection--single {
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 0.75rem !important;
    border-radius: var(--radius-sm, 0.25rem) !important;
    background-color: transparent !important;
    border-color: transparent !important;
}
.hw-inline-select-wrap .select2-container .select2-selection--single .select2-selection__rendered {
    font-size: 0.75rem !important;
    line-height: 24px !important;
    padding-left: 0 !important;
}
.hw-inline-select-wrap .select2-container .select2-selection--single .select2-selection__arrow {
    display: none !important;
}
.hw-inline-select-wrap .select2-container .select2-selection--single:hover {
    border-color: var(--border) !important;
    background-color: var(--muted) !important;
}
.hw-inline-select-wrap .select2-container--open .select2-selection--single {
    background-color: var(--background) !important;
    border-color: var(--primary) !important;
}
.hw-inline-select-wrap .select2-container .select2-selection__clear {
    font-size: 0.85rem !important;
    margin-right: 2px !important;
    color: var(--muted-foreground) !important;
    cursor: pointer !important;
}
.hw-inline-select-wrap .select2-container .select2-selection__clear:hover {
    color: var(--destructive) !important;
}
/* When allowClear is active, give rendered text more padding for the × */
.hw-inline-select-wrap .select2-container--clearable .select2-selection--single .select2-selection__rendered {
    padding-right: 16px !important;
}

/* ── Inline select dropdown ────────────────────────────────── */
.select2-container--hw-inline .select2-dropdown {
    font-size: 0.75rem !important;
    min-width: 160px !important;
}
.select2-container--hw-inline .select2-results__option {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
}

/* ============================================================
   Tagify Theme Override — Match KTUI styling
   ============================================================ */
.tagify {
    --tag-bg: color-mix(in oklab, var(--primary) 12%, transparent);
    --tag-text-color: var(--primary);
    --tag-hover: color-mix(in oklab, var(--primary) 20%, transparent);
    --tag-remove-bg: color-mix(in oklab, var(--primary) 25%, transparent);
    --tag-remove-btn-color: var(--primary);
    --tags-border-color: var(--input);
    --tags-focus-border-color: var(--primary);
    --tag-border-radius: var(--radius-sm, 0.25rem);
    --input-color: var(--foreground);
    --placeholder-color: var(--muted-foreground);
    border-radius: var(--radius, 0.375rem);
    background: var(--background);
    font-size: 0.8125rem;
    min-height: 34px;
    height: auto !important;
    flex-wrap: wrap !important;
    gap: 3px;
    padding: 4px 6px;
}
/* Tagify inside table cells — prevent overlap */
td .tagify {
    max-height: none;
    overflow: visible;
}
td:has(.tagify) {
    vertical-align: top;
    padding-top: 8px;
    padding-bottom: 8px;
    overflow: visible;
}
.tagify .tagify__tag {
    margin: 2px 3px !important;
}

/* ── Inline Editable Text ──────────────────────────────────── */
.hw-inline-editable {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm, 0.25rem);
    border: 1px solid transparent;
    cursor: text;
    min-width: 80px;
    font-size: 0.8125rem;
    color: var(--foreground);
    transition: border-color 0.15s, background-color 0.15s;
    line-height: 1.5;
    outline: none;
}
.hw-inline-editable:hover {
    border-color: var(--border);
    background-color: var(--accent);
}
.hw-inline-editable:focus {
    border-color: var(--primary);
    background-color: var(--background);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 15%, transparent);
}
.hw-inline-editable[disabled] {
    cursor: default;
    opacity: 0.6;
}
.hw-inline-editable[disabled]:hover {
    border-color: transparent;
    background-color: transparent;
}
.tagify:hover {
    border-color: var(--ring);
}
.tagify:focus-within,
.tagify.tagify--focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 15%, transparent);
}
.tagify__dropdown {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius, 0.375rem);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 9998;
}
.dark .tagify__dropdown {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.tagify__dropdown__item {
    color: var(--foreground);
    font-size: 0.8125rem;
}
.tagify__dropdown__item--active {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* ── Arbitrary value utilities ────────────────────────────── */
.text-\[11px\] { font-size: 11px; }
.text-\[10px\] { font-size: 10px; }
.max-h-\[300px\] { max-height: 300px; }
.max-h-\[400px\] { max-height: 400px; }
.max-h-\[500px\] { max-height: 500px; }
.max-w-\[400px\] { max-width: 400px; }
.top-\[15\%\] { top: 15%; }
.w-\[120px\] { width: 120px; }

/* ── Transition helper ──────────────────────────────────────── */
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* ── accent opacity variant ──────────────────────────────────── */
.bg-accent\/50 { background-color: color-mix(in oklab, var(--accent) 50%, transparent); }

/* ── ApexCharts overrides ──────────────────────────────────── */
/* Transparent background — dark mode theme adds an opaque background */
.apexcharts-canvas { background: transparent !important; }
.apexcharts-canvas svg { background: transparent !important; }


/* ============================================================
   Daily Section — Shared Animations & Components
   ============================================================ */

/* ── Keyframes ──────────────────────────────────────────────── */

@keyframes dly-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes dly-pulse-glow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 27, 132, 255), 0.3); }
    50%      { transform: scale(1.03); box-shadow: 0 0 12px 4px rgba(var(--primary-rgb, 27, 132, 255), 0.15); }
}

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

@keyframes dly-progress-fill {
    from { width: 0%; }
}

@keyframes dly-spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes dly-marker-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5); }
    50%      { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
}

/* ── Stagger entrance system ────────────────────────────────── */

.dly-stagger {
    opacity: 0;
    animation: dly-fade-up 0.45s ease forwards;
}
.dly-stagger-1 { animation-delay: 0.05s; }
.dly-stagger-2 { animation-delay: 0.10s; }
.dly-stagger-3 { animation-delay: 0.15s; }
.dly-stagger-4 { animation-delay: 0.20s; }
.dly-stagger-5 { animation-delay: 0.25s; }
.dly-stagger-6 { animation-delay: 0.30s; }
.dly-stagger-7 { animation-delay: 0.35s; }
.dly-stagger-8 { animation-delay: 0.40s; }

/* ── Hero gradient banner ───────────────────────────────────── */

/* ── Immersive Hero Banner ─────────────────────────────────── */
.dw-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
}
.dw-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: background-image 0.6s ease;
}
.dw-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.45) 100%);
}
.dw-hero-content {
    position: relative;
    z-index: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}
.dw-hero-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.dw-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}
.dw-hero-stat i {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}
.dw-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
.dw-hero-pill i {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}
.dw-hero-spark-wrap {
    flex-shrink: 0;
    overflow: hidden;
}
/* Force ApexCharts white tooltip in hero */
.dw-hero .apexcharts-tooltip {
    color: #333 !important;
}

/* ── Glassmorphism card ─────────────────────────────────────── */

.dly-glass-card {
    background: color-mix(in srgb, var(--card) 80%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}

/* ── Animated progress bar ──────────────────────────────────── */

.dly-progress-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--muted);
    overflow: hidden;
}
.dly-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dly-progress-fill 0.8s ease;
}

/* ── Floating animation ─────────────────────────────────────── */

.dly-float {
    animation: dly-float 3s ease-in-out infinite;
}

/* ── Slow spin (sync buttons) ───────────────────────────────── */

.dly-spinning {
    animation: dly-spin-slow 1s linear infinite;
}

/* ── Zone / Status badges ───────────────────────────────────── */

.dly-zone-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.dly-zone-good   { background: rgba(80, 205, 137, 0.12); color: #50CD89; }
.dly-zone-warn   { background: rgba(255, 199, 0, 0.12);  color: #FFC700; }
.dly-zone-danger { background: rgba(241, 65, 108, 0.12); color: #F1416C; }
.dly-zone-info   { background: rgba(62, 151, 255, 0.12); color: #3E97FF; }

.dark .dly-zone-good   { background: rgba(80, 205, 137, 0.08); }
.dark .dly-zone-warn   { background: rgba(255, 199, 0, 0.08); }
.dark .dly-zone-danger { background: rgba(241, 65, 108, 0.08); }
.dark .dly-zone-info   { background: rgba(62, 151, 255, 0.08); }

/* ── Vertical timeline ──────────────────────────────────────── */

.dly-timeline {
    position: relative;
    padding-left: 24px;
}
.dly-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}
.dly-timeline-item {
    position: relative;
    padding-bottom: 16px;
}
.dly-timeline-item:last-child { padding-bottom: 0; }
.dly-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted-foreground);
    border: 2px solid var(--card);
    z-index: 1;
}
.dly-timeline-item.dly-tl-primary::before   { background: var(--primary); }
.dly-timeline-item.dly-tl-success::before   { background: #50CD89; }
.dly-timeline-item.dly-tl-warning::before   { background: #FFC700; }
.dly-timeline-item.dly-tl-danger::before    { background: #F1416C; }
.dly-timeline-item.dly-tl-info::before      { background: #3E97FF; }
.dly-timeline-item.dly-tl-active::before {
    animation: dly-marker-pulse 2s ease-in-out infinite;
}

/* ── Horizontal package step tracker ────────────────────────── */

/* ── Package carrier stacked bar ───────────────────────────── */
/* ── Main Tabs (Orders | Packages) ────────────────────────── */
.dp-main-tabs {
    display: flex;
    gap: 2px;
    background: var(--muted);
    border-radius: 10px;
    padding: 3px;
}
.dp-main-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-foreground);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dp-main-tab:hover { color: var(--foreground); }
.dp-main-tab.active {
    background: var(--card);
    color: var(--foreground);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.dp-main-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: var(--border);
    color: var(--muted-foreground);
}
.dp-main-tab.active .dp-main-tab-count {
    background: var(--primary);
    color: white;
}

/* ── Order & Package Tables ──────────────────────────────── */

/* ── Invoice Upload Zone ─────────────────────────────────── */
.dp-invoice-upload {
    border: 1px dashed var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}
.dp-invoice-upload:hover {
    border-color: var(--primary);
}

/* line-clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Package Filter Tabs ───────────────────────────────────── */
.dp-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted-foreground);
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.dp-filter-tab:hover { background: var(--muted); }
.dp-filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.dp-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: var(--muted);
    color: var(--muted-foreground);
}
.dp-filter-tab.active .dp-filter-count {
    background: rgba(255,255,255,0.25);
    color: white;
}
.dp-status-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.dp-archived-row {
    opacity: 0.45;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        color-mix(in srgb, var(--muted) 30%, transparent) 8px,
        color-mix(in srgb, var(--muted) 30%, transparent) 9px
    );
}
.dp-archived-row:hover { opacity: 0.7; }

/* ── Progress Bar ────────────────────────────────────────── */
.dp-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--muted);
    overflow: hidden;
}
.dp-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Archive Toggle Switch ───────────────────────────────── */
.dp-archive-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--muted);
    transition: all 0.2s ease;
    user-select: none;
}
.dp-archive-toggle:hover { background: color-mix(in srgb, var(--muted) 80%, var(--foreground)); }
.dp-archive-toggle.active {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: var(--primary);
}
.dp-archive-toggle-track {
    width: 32px; height: 18px;
    border-radius: 9px;
    background: var(--border);
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.dp-archive-toggle.active .dp-archive-toggle-track { background: var(--primary); }
.dp-archive-toggle-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 2px; left: 2px;
    transition: transform 0.2s ease;
}
.dp-archive-toggle.active .dp-archive-toggle-thumb { transform: translateX(14px); }

/* ── Detail Modal Steps ──────────────────────────────────── */
.dp-detail-steps {
    display: flex;
    align-items: center;
    padding: 8px 0;
}
.dp-detail-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.dp-detail-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid;
}
.dp-detail-step-label {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.dp-detail-step-line {
    flex: 1;
    height: 2px;
    min-width: 16px;
    margin-bottom: 22px;
    border-radius: 1px;
    transition: background 0.3s ease;
}

/* ── Activity Feed ────────────────────────────────────────── */
.dp-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.dp-activity-item:last-child { border-bottom: 0; }
.dp-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ── Leaflet dark mode ──────────────────────────────────────── */

.dark .leaflet-tile-pane {
    filter: brightness(0.7) invert(1) contrast(1.3) hue-rotate(200deg) saturate(0.3) brightness(0.8);
}
.dark .leaflet-control-zoom a {
    background: var(--card);
    color: var(--foreground);
    border-color: var(--border);
}
.dark .leaflet-control-attribution {
    background: color-mix(in srgb, var(--card) 90%, transparent) !important;
    color: var(--muted-foreground);
}
.dark .leaflet-popup-content-wrapper,
.dark .leaflet-popup-tip {
    background: var(--card);
    color: var(--foreground);
}

/* Custom colored map markers */
.dly-map-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.dly-map-marker.dly-marker-transit      { background: #3E97FF; }
.dly-map-marker.dly-marker-out          { background: #F97316; animation: dly-marker-pulse 2s ease-in-out infinite; }
.dly-map-marker.dly-marker-delivered    { background: #50CD89; }
.dly-map-marker.dly-marker-exception    { background: #F1416C; }
.dly-map-marker.dly-marker-pending      { background: var(--muted-foreground); }
.dark .dly-map-marker { border-color: var(--card); }

/* ── Pill-style view toggle ─────────────────────────────────── */

.dly-pill-toggle {
    display: inline-flex;
    background: var(--muted);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.dly-pill-toggle .dly-pill-btn {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--muted-foreground);
    background: transparent;
    border: none;
    white-space: nowrap;
}
.dly-pill-toggle .dly-pill-btn:hover {
    color: var(--foreground);
}
.dly-pill-toggle .dly-pill-btn.active {
    background: var(--card);
    color: var(--foreground);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dark .dly-pill-toggle .dly-pill-btn.active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ── FullCalendar enhancements ──────────────────────────────── */

.fc .fc-daygrid-day.fc-day-today {
    background: color-mix(in srgb, var(--primary) 6%, transparent) !important;
}
.dark .fc .fc-daygrid-day.fc-day-today {
    background: color-mix(in srgb, var(--primary) 4%, transparent) !important;
}
.fc .fc-event {
    border-radius: 4px !important;
    border: none !important;
    padding: 1px 4px;
    font-size: 11px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fc .fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.fc .fc-col-header-cell { font-size: 12px; font-weight: 600; }
.fc .fc-daygrid-day-number { font-size: 13px; font-weight: 500; }
.fc .fc-daygrid-day:hover { background: color-mix(in srgb, var(--muted) 40%, transparent); }

.dark .fc { --fc-border-color: var(--border); --fc-page-bg-color: var(--card); }
.dark .fc .fc-col-header-cell { color: var(--muted-foreground); }
.dark .fc .fc-daygrid-day-number { color: var(--foreground); }
.dark .fc .fc-button { background: var(--muted); border-color: var(--border); color: var(--foreground); }

/* ── Reading heatmap (GitHub-style) ─────────────────────────── */

.dly-heatmap {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 3px;
}
.dly-heatmap-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    background: var(--muted);
    transition: transform 0.15s ease;
}
.dly-heatmap-cell:hover { transform: scale(1.3); }
.dly-heatmap-cell.dly-heat-1 { background: #dcfce7; }
.dly-heatmap-cell.dly-heat-2 { background: #86efac; }
.dly-heatmap-cell.dly-heat-3 { background: #4ade80; }
.dly-heatmap-cell.dly-heat-4 { background: #22c55e; }
.dly-heatmap-cell.dly-heat-5 { background: #16a34a; }

.dark .dly-heatmap-cell.dly-heat-1 { background: rgba(74, 222, 128, 0.15); }
.dark .dly-heatmap-cell.dly-heat-2 { background: rgba(74, 222, 128, 0.25); }
.dark .dly-heatmap-cell.dly-heat-3 { background: rgba(74, 222, 128, 0.40); }
.dark .dly-heatmap-cell.dly-heat-4 { background: rgba(74, 222, 128, 0.60); }
.dark .dly-heatmap-cell.dly-heat-5 { background: rgba(74, 222, 128, 0.80); }

/* ── RSS reader prose enhancements ──────────────────────────── */

.dly-reader-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}
.dly-reader-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    color: var(--muted-foreground);
    font-style: italic;
}
.dly-reader-content code {
    background: var(--muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
.dly-reader-content pre code {
    display: block;
    padding: 12px;
    overflow-x: auto;
    border-radius: 8px;
}
.dly-reader-content a { color: var(--primary); text-decoration: underline; }
.dly-reader-content a:hover { opacity: 0.8; }

/* ── Calendar sidebar today card ────────────────────────────── */

.dly-today-card {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--card)), var(--card));
    border-radius: 12px;
    text-align: center;
    padding: 20px 16px;
}
.dark .dly-today-card {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, var(--card)), var(--card));
}

/* ── Carrier brand color dots ───────────────────────────────── */

.dly-carrier-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dly-carrier-laposte       { background: #FFE000; }
.dly-carrier-chronopost     { background: #004990; }
.dly-carrier-ups            { background: #6C4A32; }
.dly-carrier-dhl            { background: #D40511; }
.dly-carrier-fedex          { background: #4D148C; }
.dly-carrier-amazon         { background: #FF9900; }
.dly-carrier-mondial_relay  { background: #8C1D40; }
.dly-carrier-other          { background: var(--muted-foreground); }

/* ── Temperature color utility ──────────────────────────────── */

.dly-temp-cold    { color: #3B82F6; } /* < 5°C */
.dly-temp-cool    { color: #06B6D4; } /* 5-15°C */
.dly-temp-mild    { color: #50CD89; } /* 15-22°C */
.dly-temp-warm    { color: #F97316; } /* 22-30°C */
.dly-temp-hot     { color: #EF4444; } /* > 30°C */

/* ============================================================
   Weather Page — Redesign Styles
   ============================================================ */

/* ── Location Tab Bar ──────────────────────────────────────── */
.dw-location-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-foreground);
    background: transparent;
    border: 1.5px solid transparent;
    white-space: nowrap;
    transition: all 0.25s ease;
    cursor: pointer;
}
.dw-location-tab:hover {
    background: var(--muted);
    color: var(--foreground);
}
.dw-location-tab.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}
.dw-location-tab .dw-tab-temp {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
}

/* ── Hero Icon ─────────────────────────────────────────────── */
.dw-hero-icon {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.25));
}

/* (Old hero detail-pills, mini-stats removed — replaced by inline .dw-hero-stat/.dw-hero-pill) */

/* ── Wind Compass (SVG) ──────────────────────────────────── */
.dw-compass-wrap {
    display: flex;
    justify-content: center;
}
.dw-compass-svg {
    width: 80px;
    height: 80px;
}

/* ── Calendar color picker (small circle) ─────────────────── */
.dc-color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    background: none;
}
.dc-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}
.dc-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
.dc-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

/* ── Humidity Bar ──────────────────────────────────────────── */
.dw-humidity-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--muted);
    overflow: hidden;
}
.dw-humidity-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #06B6D4, #0891B2);
    transition: width 0.8s ease;
    width: 0%;
}

/* ── Visibility Scale ──────────────────────────────────────── */
.dw-vis-scale {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg,
        #EF4444 0%, #F97316 25%, #EAB308 50%, #50CD89 75%, #3B82F6 100%
    );
    position: relative;
    overflow: hidden;
}
.dw-vis-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    transition: width 0.8s ease;
}

/* ── Hourly Grid (fills entire width) ─────────────────────── */
.dw-hourly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
    gap: 8px;
}
.dw-hourly-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 12px;
    background: var(--muted);
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
}
.dark .dw-hourly-card {
    background: color-mix(in srgb, var(--muted) 60%, transparent);
}
.dw-hourly-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.dw-hourly-now {
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}
.dark .dw-hourly-now {
    background: color-mix(in srgb, var(--primary) 15%, var(--card));
}
.dw-hourly-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
.dw-hourly-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--muted-foreground);
    text-align: center;
}
.dw-hourly-rain {
    font-size: 10px;
    color: #60A5FA;
    font-weight: 600;
}

/* ── Daily Forecast Row ────────────────────────────────────── */
.dw-daily-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    transition: background 0.2s;
}
.dw-daily-row:hover {
    background: var(--muted);
    border-radius: 8px;
}
.dw-daily-today {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    border-radius: 8px;
}
.dw-daily-left {
    width: 90px;
    flex-shrink: 0;
}
.dw-daily-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}
.dw-daily-date {
    display: block;
    font-size: 10px;
    color: var(--muted-foreground);
}
.dw-daily-icon {
    flex-shrink: 0;
}
.dw-daily-temps {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.dw-daily-min, .dw-daily-max {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    width: 32px;
    text-align: center;
}
.dw-daily-min { color: #3B82F6; }
.dw-daily-max { color: #F97316; }
.dw-daily-range {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--muted);
    position: relative;
    min-width: 60px;
}
.dw-daily-range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 3px;
    transition: all 0.6s ease;
}
.dw-daily-extra {
    display: flex;
    gap: 8px;
    font-size: 11px;
    flex-shrink: 0;
    width: 110px;
    justify-content: flex-end;
}

/* ── Commute Side-by-Side ──────────────────────────────────── */
.dw-commute-side {
    padding: 20px;
    position: relative;
}
.dw-commute-home {
    border-right: 1px solid var(--border);
}
@media (max-width: 767px) {
    .dw-commute-home {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}
.dw-commute-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.dw-commute-weather {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.dw-commute-icon {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}
.dw-commute-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.dw-commute-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
.dark .dw-commute-stat-item {
    background: color-mix(in srgb, var(--muted) 50%, transparent);
}
.dw-commute-stat-item i {
    font-size: 11px;
    flex-shrink: 0;
}
.dw-commute-diff-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: var(--card);
    border-radius: 9999px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#dw_commute_content {
    position: relative;
}

/* ── City Cards ────────────────────────────────────────────── */
.dw-city-card {
    transition: all 0.25s ease;
}
.dw-city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .dw-daily-extra { display: none; }
    .dw-daily-left  { width: 70px; }
    .dw-hero-icon { width: 64px; height: 64px; }
    .dw-hourly-grid { grid-template-columns: repeat(auto-fit, minmax(65px, 1fr)); }
}

/* ── Print styles ──────────────────────────────────────────── */
@media print {
    #sidebar, #header, #hw_progress_rail, #hw_loader_chip,
    .hw-toast-container, #sidebar_footer { display: none !important; }
    .kt-card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
