/* ═══════════════════════════════════════════════════════════
   Joelogy Theme — Client Portal Dashboard
   Glasmorphism + Auto-fit Grid + Smart Layout
   ═══════════════════════════════════════════════════════════ */

/* ─── Hide Perfex Default Dashboard Content ─────────────── */
.section-client-dashboard > #greeting,
.section-client-dashboard > .projects-summary-heading,
.section-client-dashboard > dl,
.section-client-dashboard > .tw-mb-3,
.section-client-dashboard > .panel_s {
    display: none !important;
}

/* ─── Dashboard Background ───────────────────────────────── */
.section-client-dashboard {
    background: linear-gradient(135deg, #F8FAFF 0%, #F0F4FF 50%, #FBF8FF 100%);
    padding: 24px 0;
    min-height: 80vh;
}

/* ─── Greeting ───────────────────────────────────────────── */
.jl-greeting {
    margin-top: 24px;
    margin-bottom: 4px;
}

.jl-greeting-title {
    font-family: 'Exo', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 4px;
}

.jl-greeting-sub {
    font-size: 14px;
    color: #878D97;
    margin: 0;
    font-weight: 400;
}

/* ─── Stat Cards Row (auto-fit, always fills perfectly) ──── */
.jl-stat-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* ─── Widget Grid (flex-based, auto-adapting) ────────────── */
.jl-dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.jl-widget-panel.jl-wide {
    flex: 2 1 500px;
    min-width: 0;
}

.jl-widget-panel.jl-narrow {
    flex: 1 1 280px;
    min-width: 0;
}

/* ─── Notices Area ──────────────────────────────────────── */
.jl-notices-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* ─── Glasmorphism Base Card ─────────────────────────────── */
.jl-glass-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(14, 90, 242, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
    opacity: 0;
    animation: jl-fadeInUp 0.5s ease-out forwards;
}

.jl-glass-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(14, 90, 242, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Staggered entrance animation */
.jl-glass-card:nth-child(1)  { animation-delay: 0.05s; }
.jl-glass-card:nth-child(2)  { animation-delay: 0.10s; }
.jl-glass-card:nth-child(3)  { animation-delay: 0.15s; }
.jl-glass-card:nth-child(4)  { animation-delay: 0.20s; }
.jl-glass-card:nth-child(5)  { animation-delay: 0.25s; }
.jl-glass-card:nth-child(6)  { animation-delay: 0.30s; }
.jl-glass-card:nth-child(7)  { animation-delay: 0.35s; }
.jl-glass-card:nth-child(8)  { animation-delay: 0.40s; }
.jl-glass-card:nth-child(9)  { animation-delay: 0.45s; }
.jl-glass-card:nth-child(10) { animation-delay: 0.50s; }
.jl-glass-card:nth-child(11) { animation-delay: 0.55s; }
.jl-glass-card:nth-child(12) { animation-delay: 0.60s; }

/* ─── Stat Cards ─────────────────────────────────────────── */
.jl-stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit !important;
}

.jl-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--card-color) 0%, transparent 70%);
    opacity: 0.08;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.jl-stat-card:hover::before {
    opacity: 0.14;
}

.jl-stat-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light, var(--card-color)));
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jl-stat-card:hover .jl-stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.jl-stat-content {
    flex: 1;
    min-width: 0;
}

.jl-stat-number {
    font-family: 'Exo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.jl-stat-label {
    font-family: 'Fira Sans', sans-serif;
    font-size: 13px;
    color: #878D97;
    font-weight: 500;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jl-stat-sparkline {
    position: absolute;
    top: 12px;
    right: 16px;
    opacity: 0.5;
}

/* ─── Widget Panels ──────────────────────────────────────── */
.jl-widget-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.jl-widget-header {
    padding: 20px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.jl-widget-header h4 {
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jl-widget-header h4 i {
    font-size: 14px;
    opacity: 0.5;
}

.jl-widget-header .jl-widget-link {
    font-size: 13px;
    color: #0E5AF2;
    text-decoration: none !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.jl-widget-header .jl-widget-link:hover {
    gap: 8px;
}

.jl-widget-header .jl-widget-link::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
}

.jl-widget-body {
    padding: 16px 24px 24px;
    flex: 1;
}

/* ─── Widget Table ───────────────────────────────────────── */
.jl-widget-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.jl-widget-table th {
    font-family: 'Exo', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #878D97;
    padding: 0 12px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: left;
}

.jl-widget-table td {
    padding: 12px;
    font-size: 13.5px;
    color: #1A1A1A;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
}

.jl-widget-table tbody tr {
    transition: background 0.2s ease;
}

.jl-widget-table tbody tr:hover {
    background: rgba(14, 90, 242, 0.03);
}

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

.jl-widget-table .jl-amount {
    font-family: 'Exo', sans-serif;
    font-weight: 600;
}

/* ─── Status Badges ──────────────────────────────────────── */
.jl-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.jl-badge,
.jl-widget-table td .jl-badge {
    color: #fff !important;
}

.jl-badge--paid,
.jl-badge--active,
.jl-badge--completed,
.jl-badge--online {
    background: #10B981 !important;
    color: #fff !important;
}

.jl-badge--overdue,
.jl-badge--expired,
.jl-badge--offline,
.jl-badge--cancelled {
    background: #EF4444 !important;
    color: #fff !important;
}

.jl-badge--open,
.jl-badge--sent,
.jl-badge--inprogress {
    background: #3B82F6 !important;
    color: #fff !important;
}

.jl-badge--pending,
.jl-badge--draft,
.jl-badge--partial {
    background: #F59E0B !important;
    color: #fff !important;
}

.jl-badge--closed {
    background: #6B7280 !important;
    color: #fff !important;
}

/* ─── Quick Actions ──────────────────────────────────────── */
.jl-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.jl-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    text-decoration: none !important;
    color: #1A1A1A !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jl-action-btn:hover {
    transform: translateY(-3px) scale(1.04);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    color: #1A1A1A !important;
}

.jl-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.jl-action-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* ─── Ticket List ────────────────────────────────────────── */
.jl-ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jl-ticket-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: padding-left 0.2s ease;
}

.jl-ticket-item:hover {
    padding-left: 4px;
}

.jl-ticket-item:last-child {
    border-bottom: none;
}

.jl-ticket-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.jl-ticket-dot--open { background: #2563EB; }
.jl-ticket-dot--answered { background: #059669; }
.jl-ticket-dot--closed { background: #6B7280; }
.jl-ticket-dot--inprogress { background: #F59E0B; }

.jl-ticket-info {
    flex: 1;
    min-width: 0;
}

.jl-ticket-subject {
    font-size: 13.5px;
    font-weight: 500;
    color: #1A1A1A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jl-ticket-subject a {
    color: inherit !important;
    text-decoration: none !important;
}

.jl-ticket-subject a:hover {
    color: #0E5AF2 !important;
}

.jl-ticket-meta {
    font-size: 12px;
    color: #878D97;
    margin-top: 2px;
}

/* ─── Notice Banners ─────────────────────────────────────── */
.jl-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    animation: jl-fadeInUp 0.4s ease-out both;
    position: relative;
}

.jl-notice--info    { background: rgba(14, 90, 242, 0.10); border-left: 3px solid #0E5AF2; }
.jl-notice--warning { background: rgba(251, 191, 36, 0.10); border-left: 3px solid #F59E0B; }
.jl-notice--danger  { background: rgba(239, 68, 68, 0.10); border-left: 3px solid #EF4444; }
.jl-notice--success { background: rgba(34, 197, 94, 0.10); border-left: 3px solid #22C55E; }

.jl-notice-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.jl-notice--info .jl-notice-icon    { color: #0E5AF2; }
.jl-notice--warning .jl-notice-icon { color: #F59E0B; }
.jl-notice--danger .jl-notice-icon  { color: #EF4444; }
.jl-notice--success .jl-notice-icon { color: #22C55E; }

.jl-notice-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
}

.jl-notice-text a {
    font-weight: 600;
    text-decoration: underline;
}

.jl-notice-dismiss {
    background: none;
    border: none;
    color: #878D97;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s ease;
    line-height: 1;
}

.jl-notice-dismiss:hover {
    color: #1A1A1A;
}

/* ─── Empty State ────────────────────────────────────────── */
.jl-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: #878D97;
}

.jl-empty-state i {
    font-size: 36px;
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

.jl-empty-state p {
    font-size: 13px;
    margin: 0;
}

/* ─── Nav Badges ─────────────────────────────────────────── */
.jl-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    line-height: 1;
    animation: jl-scaleIn 0.3s ease-out;
}

.jl-nav-badge--danger  { background: #EF4444; color: #fff; }
.jl-nav-badge--warning { background: #F59E0B; color: #fff; }
.jl-nav-badge--info    { background: #0E5AF2; color: #fff; }
.jl-nav-badge--success { background: #22C55E; color: #fff; }

/* ─── Submenu Settings Button (next to Dateien/Kalender) ──── */
.customers-top-submenu-settings {
    float: right !important;
}

.jl-nav-settings-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    background: rgba(14, 90, 242, 0.08) !important;
    color: #0E5AF2 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
    text-decoration: none !important;
}

.jl-nav-settings-btn:hover {
    background: rgba(14, 90, 242, 0.15) !important;
    color: #0E5AF2 !important;
}

.jl-nav-settings-btn i {
    font-size: 13px;
}

.jl-nav-settings-btn.jl-active {
    background: #0E5AF2 !important;
    color: #fff !important;
}

/* ─── Tour Restart Button (next to profile) ─────────────── */
.jl-tour-restart-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    color: #878D97 !important;
    font-size: 18px !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
    margin-top: 9px;
}

.jl-tour-restart-btn:hover {
    color: #0E5AF2 !important;
    background: rgba(14, 90, 242, 0.08) !important;
}

/* ─── Drag & Drop ───────────────────────────────────────── */
.jl-glass-card[draggable="true"] {
    cursor: default;
}

.jl-glass-card.jl-dragging {
    opacity: 0.35 !important;
    transform: scale(0.97) !important;
    box-shadow: 0 0 0 2px rgba(14, 90, 242, 0.3) !important;
    cursor: grabbing !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.jl-glass-card.jl-drag-over {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow:
        0 0 0 2px rgba(14, 90, 242, 0.4),
        0 12px 40px rgba(14, 90, 242, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jl-drag-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #A0A5AD;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    cursor: grab;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
}

.jl-drag-handle:active {
    cursor: grabbing;
}

.jl-glass-card:hover .jl-drag-handle {
    opacity: 1;
}

.jl-drag-handle:hover {
    background: rgba(14, 90, 242, 0.08);
    color: #0E5AF2;
}

/* ─── Settings Drawer ──────────────────────────────────── */
.jl-settings-drawer {
    display: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(14, 90, 242, 0.1), 0 2px 8px rgba(0,0,0,0.04);
    padding: 24px;
    margin-top: 16px;
    margin-bottom: 8px;
    animation: jl-fadeInUp 0.3s ease-out;
}

.jl-settings-drawer.jl-open {
    display: block;
}

.jl-settings-drawer h3 {
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jl-settings-drawer h3 i {
    color: #878D97;
    font-size: 14px;
}

.jl-settings-hint {
    font-size: 12.5px;
    color: #878D97;
    margin: 0 0 16px;
    line-height: 1.5;
}

.jl-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.jl-settings-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease;
    cursor: pointer;
}

.jl-settings-item:hover {
    background: rgba(14, 90, 242, 0.04);
}

.jl-settings-item .jl-settings-label {
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
    cursor: pointer;
    flex: 1;
    margin: 0;
    user-select: none;
}

/* Toggle Switch */
.jl-toggle {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

.jl-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.jl-toggle-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #D1D5DB;
    border-radius: 11px;
    transition: background 0.25s ease;
    cursor: pointer;
}

.jl-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jl-toggle input:checked + .jl-toggle-track {
    background: #0E5AF2;
}

.jl-toggle input:checked + .jl-toggle-track::after {
    transform: translateX(16px);
}

/* Hidden widget state */
.jl-glass-card.jl-hidden-widget {
    display: none !important;
}

/* ─── Guided Tour ───────────────────────────────────────── */
.jl-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: auto;
    animation: jl-fadeIn 0.3s ease-out;
}

.jl-tour-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 30, 0.5);
    z-index: -1;
}

.jl-tour-spotlight {
    position: fixed;
    z-index: 10001;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(10, 15, 30, 0.55);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.jl-tour-spotlight::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(14, 90, 242, 0.5);
    border-radius: 14px;
    animation: jl-tourPulse 2s ease-in-out infinite;
}

@keyframes jl-tourPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.jl-tour-card {
    position: fixed;
    z-index: 10002;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    padding: 24px;
    max-width: 380px;
    width: 90%;
    animation: jl-scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jl-tour-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #0E5AF2;
    background: rgba(14, 90, 242, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.jl-tour-card h3 {
    font-family: 'Exo', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 8px;
}

.jl-tour-card p {
    font-size: 14px;
    color: #878D97;
    line-height: 1.6;
    margin: 0 0 20px;
}

.jl-tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jl-tour-dots {
    display: flex;
    gap: 6px;
}

.jl-tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    transition: all 0.3s ease;
}

.jl-tour-dot.jl-active {
    background: #0E5AF2;
    width: 20px;
    border-radius: 4px;
}

.jl-tour-actions {
    display: flex;
    gap: 8px;
}

.jl-tour-skip {
    background: none;
    border: none;
    color: #878D97;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.jl-tour-skip:hover {
    color: #1A1A1A;
    background: rgba(0,0,0,0.04);
}

.jl-tour-next {
    background: linear-gradient(135deg, #00BCFA 0%, #0E59F2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 3px 12px rgba(14, 90, 242, 0.25);
}

.jl-tour-next:hover {
    box-shadow: 0 6px 20px rgba(14, 90, 242, 0.4);
    transform: translateY(-1px);
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes jl-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes jl-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes jl-countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1200px) {
    .jl-stat-cards-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 992px) {
    /* Stat cards: 2 per row */
    .jl-stat-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* All widgets full width */
    .jl-widget-panel.jl-wide,
    .jl-widget-panel.jl-narrow {
        flex: 1 1 100% !important;
    }

    /* Hide drag handles on touch devices */
    .jl-drag-handle {
        display: none;
    }
}

@media (max-width: 768px) {
    .jl-dashboard-grid {
        gap: 12px;
    }

    .jl-stat-cards-row {
        gap: 12px;
    }

    .jl-stat-card {
        padding: 18px;
    }

    .jl-stat-number {
        font-size: 26px;
    }

    .jl-stat-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 17px;
        border-radius: 12px;
    }

    .jl-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .jl-widget-header {
        padding: 16px 18px 12px;
    }

    .jl-widget-body {
        padding: 12px 18px 18px;
    }

    .section-client-dashboard {
        padding: 16px 0;
    }
}

@media (max-width: 480px) {
    .jl-stat-cards-row {
        grid-template-columns: 1fr;
    }

    .jl-stat-card {
        padding: 16px;
    }

    .jl-stat-number {
        font-size: 22px;
    }

    .jl-actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .jl-action-btn {
        padding: 14px 8px;
    }
}

/* ─── Print ──────────────────────────────────────────────── */
@media print {
    .jl-glass-card {
        background: #fff !important;
        backdrop-filter: none !important;
        box-shadow: 1px 1px 3px #ccc !important;
        animation: none !important;
        opacity: 1 !important;
    }

    .jl-notice-dismiss,
    .jl-stat-sparkline,
    .jl-drag-handle,
    .jl-nav-settings-btn {
        display: none !important;
    }
}
