:root {
    --bg-main: #0a0e1a;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(26, 36, 56, 0.9);
    --bg-subtle: #161f30;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(6, 182, 212, 0.3);
    
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.35);
    --primary-hover: #0891b2;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.35);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --bad: #f97316;
    --bad-bg: rgba(249, 115, 22, 0.15);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(6, 182, 212, 0.05);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.07) 0%, transparent 40%),
        linear-gradient(180deg, #070a14 0%, #0c1222 100%);
}

.hidden {
    display: none !important;
}

/* =========================================================================
   MODERN NOC & SIDEBAR WORKSPACE LAYOUT
   ========================================================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    background: #080d1a;
}

/* SIDEBAR NAVIGATION */
.sidebar-nav {
    width: 285px;
    min-width: 285px;
    max-width: 285px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sidebar-brand {
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 0 18px var(--primary-glow);
    flex-shrink: 0;
}

.sidebar-brand .brand-text h1 {
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
}

.sidebar-brand .sub-title {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    margin-top: 1px;
}

.sidebar-menu {
    padding: 0.6rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    overflow-y: auto;
}

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

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.menu-category {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.65rem 0.15rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.58rem 0.85rem;
    border-radius: 8px;
    color: #94a3b8;
    background: transparent;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    text-align: right;
    width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
}

.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(-2px);
}

[dir="ltr"] .nav-item:hover {
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #fff;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.nav-item.admin-highlight {
    background: rgba(6, 182, 212, 0.08);
    border: 1px dashed rgba(6, 182, 212, 0.35);
    color: #a5f3fc;
}

.nav-item.admin-highlight:hover {
    background: rgba(6, 182, 212, 0.2);
    color: #fff;
}

/* SIDEBAR FOOTER WIDGET */
.sidebar-footer {
    padding: 0.65rem 0.85rem;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 15, 30, 0.96);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.client-widget {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
}

.client-widget-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.client-widget-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.client-widget-info strong {
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================================
   DESKTOP TOP OPERATIONS BAR (شريط العمليات والتحكم العلوي للشاشات الكبيرة)
   ========================================================================= */
.desktop-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.75rem;
    margin: -1.5rem -1.75rem 1.5rem -1.75rem;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: -1.5rem;
    z-index: 90;
}

.top-bar-start {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.top-bar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.top-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.top-btn-icon:hover {
    color: var(--primary);
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-1px);
}

.top-btn-pill {
    height: 38px;
    padding: 0 0.85rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.top-btn-pill:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* MOBILE TOP BAR */
.mobile-top-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 80;
    margin: -1.5rem -1.75rem 1.25rem -1.75rem;
}

.mobile-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mobile-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .desktop-top-bar {
        display: none !important;
    }
    .mobile-top-bar {
        display: flex !important;
    }
    .sidebar-nav {
        position: fixed !important;
        right: -320px !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transition: right 0.3s ease !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8) !important;
    }
    .sidebar-nav.active {
        right: 0 !important;
    }
    [dir="ltr"] .sidebar-nav {
        right: auto !important;
        left: -320px !important;
        transition: left 0.3s ease !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8) !important;
    }
    [dir="ltr"] .sidebar-nav.active {
        left: 0 !important;
    }
}

/* MAIN WORKSPACE */
.main-workspace {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    max-height: 100vh;
    box-sizing: border-box;
}

.content-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.content-section.hidden {
    display: none !important;
}

/* =========================================================================
   ENTERPRISE DESIGN SYSTEM: BUTTONS & BADGES (Clean & High-Contrast)
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.4;
    user-select: none;
    font-family: inherit;
}

.btn-sm {
    padding: 0.38rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.75rem 1.6rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: #0284c7;
    color: #ffffff !important;
    border-color: #0369a1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: #0369a1;
    border-color: #075985;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc2626;
    color: #ffffff !important;
    border-color: #b91c1c;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #991b1b;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: #059669;
    color: #ffffff !important;
    border-color: #047857;
}

.btn-success:hover {
    background: #047857;
    border-color: #065f46;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8 !important;
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    color: #ffffff !important;
}

.glow-btn {
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.35);
}

.glow-btn:hover {
    box-shadow: 0 0 24px rgba(2, 132, 199, 0.55);
}

/* Status Badges */
.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-expiring {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-expired {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-lifetime {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* =========================================================================
   CLIENT AUTH GATEWAY SCREEN STYLES
   ========================================================================= */
   ========================================================================= */
.login-wrapper {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 1.5rem;
    box-sizing: border-box;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 45%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.12), transparent 45%),
                #080d1a;
}

.login-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    margin: auto !important;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.4s ease-out;
    box-sizing: border-box;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 0 25px var(--primary-glow);
}

.login-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.4rem;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    text-align: center;
}

.login-footer-info {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.btn-block {
    width: 100%;
}

/* MAIN CONTAINER */
.main-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    width: 100%;
}

/* STEPPER */
.stepper-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 1.2rem 2rem;
    border-radius: var(--radius-lg);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.45;
    transition: var(--transition);
}

.step-item.active {
    opacity: 1;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.step-item.active .step-circle {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 16px var(--primary-glow);
}

.step-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.step-item.active .step-label {
    color: var(--text-main);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 1.2rem;
    transition: var(--transition);
}

.step-line.active {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* =========================================================================
   MAIN APPLICATION MODE SWITCHER (ريسيلر vs فحص الخدمة العامة)
   ========================================================================= */
.main-mode-switcher {
    display: flex;
    gap: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(139, 92, 246, 0.25));
    border: 1px solid rgba(6, 182, 212, 0.45);
    color: #fff;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.preset-meta-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
}

/* =========================================================================
   CUSTOM INTERACTIVE SAS TOWER CARDS PICKER
   ========================================================================= */
.sas-portals-picker-wrap {
    margin-bottom: 1.5rem;
}

.picker-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.picker-label-row label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-hint-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.sas-portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.9rem;
}

.portal-picker-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(10, 15, 29, 0.95) 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    user-select: none;
}

.portal-picker-card:hover {
    border-color: rgba(6, 182, 212, 0.45);
    background: linear-gradient(135deg, rgba(20, 30, 55, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.portal-picker-card.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(6, 182, 212, 0.05);
}

.portal-card-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.portal-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.portal-picker-card.active .portal-icon-box {
    background: var(--primary);
    color: #041017;
    box-shadow: 0 0 12px var(--primary-glow);
    border-color: var(--primary);
}

.portal-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.portal-info-text strong {
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-url-tag {
    font-size: 0.76rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: right;
}

.portal-picker-card.active .portal-url-tag {
    color: #a5f3fc;
}

.portal-check-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.portal-picker-card.active .portal-check-indicator {
    background: var(--primary);
    border-color: var(--primary);
    color: #041017;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* =========================================================================
   PUBLIC WAN BENCHMARK CARDS & VERDICT
   ========================================================================= */
.overall-verdict-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
}

.verdict-title {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.verdict-text {
    font-size: 0.95rem;
    font-weight: 800;
}

.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.benchmark-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.benchmark-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.benchmark-card.testing {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.benchmark-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benchmark-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bm-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bm-details strong {
    font-size: 0.95rem;
    color: #fff;
    display: block;
}

.bm-details small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.bm-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.bm-metrics-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bm-ping-val {
    font-size: 1.6rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    line-height: 1;
}

.bm-ping-val small {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 0.2rem;
}

.bm-sub-stats {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.bm-progress-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.bm-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.1s linear;
}

/* CARDS */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-title h2 {
    font-size: 1.25rem;
    font-weight: 800;
}

.accent-icon {
    color: var(--primary);
    font-size: 1.3rem;
}

.safe-badge {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-body {
    padding: 2rem;
}

/* TABS */
.tabs-nav {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--primary);
    color: #041017;
    border-color: var(--primary);
    font-weight: 800;
    box-shadow: 0 0 15px var(--primary-glow);
}

.demo-btn {
    margin-right: auto;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
    border-color: var(--accent);
    color: #c4b5fd;
}

.demo-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(15, 23, 42, 0.9);
}

.hint {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.form-actions {
    margin-top: 1.8rem;
    display: flex;
    justify-content: flex-end;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: #021526;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #22d3ee, #0369a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-excel {
    background: linear-gradient(135deg, #107c41, #0c592f);
    color: #fff;
}

.btn-excel:hover {
    background: #0f6c38;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2.2rem;
    font-size: 1.05rem;
}

.glow-btn {
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
}

/* ALERTS */
.alert-box {
    margin-top: 1.5rem;
    padding: 1rem 1.3rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.alert-box.success {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.alert-box.error {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.alert-box.hidden,
.hidden {
    display: none !important;
}

/* SECTION 2: CONFIG BAR */
.config-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    background: var(--bg-subtle);
    padding: 1.3rem 1.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.config-item label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.preset-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.input-sm {
    width: 80px;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    text-align: center;
}

.btn-group-chips {
    display: flex;
    gap: 0.35rem;
}

.chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover {
    color: #fff;
    border-color: var(--primary);
}

.chip.active {
    background: var(--primary);
    color: #041017;
    border-color: var(--primary);
    font-weight: 700;
}

/* USERS TOOLBAR */
.users-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--bg-subtle);
    border: 2px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.custom-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
    content: '✔';
    font-size: 0.75rem;
    color: #041017;
    font-weight: 900;
}

.filter-search-box {
    position: relative;
    width: 320px;
}

.filter-search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

.filter-search-box input {
    width: 100%;
    padding: 0.6rem 2.4rem 0.6rem 1rem;
    font-size: 0.9rem;
}

/* STEP 2: USERS HEADER TOOLS & QUICK SETUP BAR */
.header-tools {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 200px;
    max-width: 280px;
}

.search-box i {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

[dir="ltr"] .search-box i {
    right: auto;
    left: 12px;
}

.search-box input {
    width: 100%;
    padding: 0.45rem 2.2rem 0.45rem 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.86rem;
    box-sizing: border-box;
}

[dir="ltr"] .search-box input {
    padding: 0.45rem 0.75rem 0.45rem 2.2rem;
}

.ping-setup-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.setup-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.actions-col {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.users-table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.5);
    box-sizing: border-box !important;
}

.users-table-container table {
    width: 100% !important;
    min-width: 820px;
    border-collapse: collapse;
}

/* =========================================================================
   SLEEK MODERN GLASSMORPHIC FILTER PILL TABS
   ========================================================================= */
.dude-filter-tabs {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
    background: rgba(15, 23, 42, 0.65) !important;
    padding: 0.35rem 0.45rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
}

.dude-filter-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.95rem !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    font-family: 'Cairo', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    white-space: nowrap !important;
}

.dude-filter-tab:hover {
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px) !important;
}

.dude-filter-tab.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(14, 165, 233, 0.25)) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    font-weight: 800 !important;
}

.dude-filter-tab .badge-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    font-family: 'JetBrains Mono', monospace !important;
    transition: all 0.2s ease !important;
}

.dude-filter-tab.active .badge-count {
    background: rgba(56, 189, 248, 0.25) !important;
    color: #67e8f9 !important;
}

/* Specific color glows for each active tab */
#tabResOnline.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25)) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #34d399 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.22) !important;
}
#tabResOnline.active .badge-count {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
}

#tabResExpiring.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.25)) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.22) !important;
}
#tabResExpiring.active .badge-count {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #fde68a !important;
}

#tabResExpired.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.25)) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    color: #f87171 !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.22) !important;
}
#tabResExpired.active .badge-count {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}

/* DATA TABLE */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.4);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.92rem;
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    white-space: nowrap;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.ip-badge {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    background: rgba(6, 182, 212, 0.1);
    color: #67e8f9;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}

.mac-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* SECTION 3: LIVE MONITOR */
.live-header {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.1), transparent);
}

.live-pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 12px var(--danger);
    animation: liveBlink 1s infinite;
}

@keyframes liveBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

.current-target-card {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.target-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.target-badge {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.target-meta h3 {
    font-size: 1.6rem;
    font-weight: 900;
}

.target-ip-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #a5f3fc;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
}

.target-progress-container {
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 50px;
    transition: width 0.15s ease-out;
}

.live-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.metric-loss .metric-icon { background: var(--danger-bg); color: #f87171; }
.metric-ping .metric-icon { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.metric-sent .metric-icon { background: rgba(139, 92, 246, 0.15); color: #c084fc; }
.metric-jitter .metric-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-val {
    font-size: 1.45rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.metric-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.oscilloscope-box {
    background: #060913;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.oscilloscope-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.ms-scale {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

#waveformCanvas {
    width: 100%;
    display: block;
}

/* SECTION 4: FINAL REPORT */
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.summary-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
}

.stat-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-total .stat-num { color: #fff; }
.stat-excellent .stat-num { color: #10b981; }
.stat-good .stat-num { color: #38bdf8; }
.stat-warning .stat-num { color: #f59e0b; }
.stat-bad .stat-num { color: #f97316; }
.stat-offline .stat-num { color: #ef4444; }

.health-score-banner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

/* =========================================================================
   KPI CARDS & METRIC WIDGETS
   ========================================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.kpi-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.7));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.kpi-icon.icon-cyan {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.kpi-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-icon.icon-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.kpi-label {
    color: #94a3b8;
    font-size: 0.86rem;
    font-weight: 600;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f8fafc;
    font-family: 'JetBrains Mono', 'Cairo', sans-serif;
    line-height: 1.2;
}

.kpi-subtext {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
}

.health-metric {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.health-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.health-metric strong {
    font-size: 1.3rem;
    font-family: 'JetBrains Mono', monospace;
    color: #a7f3d0;
}

.results-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover {
    color: #fff;
}

.pill.active {
    background: var(--primary);
    color: #041017;
    border-color: var(--primary);
    font-weight: 800;
}

.pill-offline.active { background: var(--danger); color: #fff; border-color: var(--danger); }
.pill-bad.active { background: var(--bad); color: #fff; border-color: var(--bad); }
.pill-warning.active { background: var(--warning); color: #000; border-color: var(--warning); }
.pill-good.active { background: var(--success); color: #fff; border-color: var(--success); }

.report-search input {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    width: 250px;
}

/* STATUS BADGES */
.badge-status {
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-excellent { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-good { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-bad { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-offline { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.mono-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* =========================================================================
   MANAGEMENT & SETTINGS MODAL STYLES
   ========================================================================= */
.settings-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: #a5f3fc;
    font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.settings-nav-btn:hover {
    background: var(--primary);
    color: #041017;
    box-shadow: 0 0 16px var(--primary-glow);
    border-color: var(--primary);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 16, 0.82);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeInModal 0.25s ease-out;
}

.modal-backdrop.hidden {
    display: none;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.modal-dialog {
    background: linear-gradient(180deg, #111827 0%, #0a0f1d 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.15);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modal-title i {
    font-size: 1.6rem;
}

.modal-title h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.modal-title .sub-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--danger);
    transform: scale(1.15);
}

.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.settings-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.settings-card.highlight-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(6, 182, 212, 0.06));
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.05);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-card-header h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.setting-text strong {
    display: block;
    font-size: 0.92rem;
    color: #f8fafc;
}

.setting-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.setting-row-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.threshold-label-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.threshold-label-wrap strong {
    font-size: 0.88rem;
    color: #f8fafc;
}

.threshold-label-wrap p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.highlight-val {
    color: #fbbf24;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.threshold-input-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.threshold-input-box input {
    width: 65px;
    text-align: center;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fbbf24;
}

.unit-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Range Slider */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
    transition: transform 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.preset-chips-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Form Grids in Modal */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
}

.setting-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.setting-field label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.setting-field input,
.setting-field select {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.88rem;
    transition: var(--transition);
}

.setting-field input:focus,
.setting-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    outline: none;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-excellent { background: #10b981; box-shadow: 0 0 6px #10b981; }
.dot-good { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.dot-warning { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* Switch Toggle (iOS style) */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.switch-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #94a3b8;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.switch-toggle input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.switch-toggle input:checked + .slider:before {
    transform: translateX(22px);
    background-color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.footer-action-right {
    display: flex;
    gap: 0.75rem;
}

.text-cyan { color: #06b6d4; }
.text-yellow { color: #f59e0b; }
.text-emerald { color: #10b981; }
.text-purple { color: #a855f7; }

/* FOOTER */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 14, 26, 0.9);
}

/* =========================================================================
   RESPONSIVENESS (MOBILE, TABLET & IPAD PERFECTION)
   ========================================================================= */

/* Tablets & iPads (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-container {
        padding: 0 1.2rem;
        margin: 1.5rem auto;
    }

    .navbar {
        padding: 0.9rem 1.5rem;
    }

    .stepper-wrapper {
        padding: 1rem 1.2rem;
        gap: 0.5rem;
    }

    .step-label {
        font-size: 0.85rem;
    }

    .step-circle {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .step-line {
        margin: 0 0.6rem;
    }

    .card-header {
        padding: 1.2rem 1.5rem;
    }

    .card-body {
        padding: 1.2rem 1.5rem;
    }

    .report-summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }

    .health-score-banner {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
}

/* Mobile Phones & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .main-container {
        padding: 0 0.8rem;
        margin: 1rem auto;
    }

    /* NAVBAR */
    .navbar {
        padding: 0.75rem 0.9rem;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .brand {
        gap: 0.6rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: var(--radius-sm);
    }

    .brand-text h1 {
        font-size: 1.05rem;
    }

    .brand-text .sub-title {
        display: none; /* Hide subtitle on small phones to save space */
    }

    .navbar-actions {
        gap: 0.5rem;
    }

    .connection-badge {
        padding: 0.3rem 0.65rem;
        font-size: 0.75rem;
    }

    .theme-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    /* STEPPER */
    .stepper-wrapper {
        padding: 0.85rem 0.75rem;
        gap: 0.3rem;
        border-radius: var(--radius-md);
        margin-bottom: 1.5rem;
        justify-content: space-between;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.72rem;
    }

    .step-line {
        margin: 0 0.3rem;
        height: 2px;
    }

    /* CARDS */
    .card {
        border-radius: var(--radius-md);
        margin-bottom: 1.2rem;
    }

    .card-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-title {
        gap: 0.6rem;
    }

    .header-title h2 {
        font-size: 1.1rem;
    }

    .header-title i {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* TABS */
    .tabs-header {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        padding-bottom: 0.4rem;
        scrollbar-width: none; /* Firefox */
    }
    .tabs-header::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .tab-btn {
        padding: 0.65rem 1rem;
        font-size: 0.82rem;
        white-space: nowrap;
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    /* FORM & INPUTS */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .full-width {
        grid-column: span 1;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }

    /* TABLE CONTROLS */
    .control-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .control-bar .search-input {
        width: 100%;
    }

    .control-bar .actions-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* DATA TABLE RESPONSIVENESS */
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-color);
        margin: 0.75rem 0;
    }

    .data-table {
        min-width: 600px; /* Enable smooth horizontal swipe */
    }

    .data-table th, 
    .data-table td {
        padding: 0.65rem 0.75rem;
        font-size: 0.82rem;
    }

    /* PARAMETERS GRID (COUNT, TIMEOUT, INTERVAL) */
    .params-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }

    /* LIVE PING MONITOR */
    .current-target-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .target-info-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .target-live-ping {
        text-align: right;
    }

    .target-progress-container {
        width: 100%;
    }

    .live-metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .metric-card {
        padding: 0.85rem 0.6rem;
    }

    .metric-card .metric-val {
        font-size: 1.35rem;
    }

    /* WAVEFORM CANVAS */
    .waveform-card {
        padding: 0.75rem;
    }

    #waveformCanvas {
        height: 120px !important;
    }

    /* SUMMARY STATS GRID */
    .report-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .summary-card {
        padding: 0.85rem 0.5rem;
    }

    .stat-num {
        font-size: 1.45rem;
    }

    .stat-title {
        font-size: 0.75rem;
    }

    /* HEALTH SCORE BANNER */
    .health-score-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
        text-align: center;
    }

    .health-metric {
        justify-content: space-between;
        padding: 0.3rem 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    }

    .health-metric:last-child {
        border-bottom: none;
    }

    /* FILTER BAR */
    .results-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-pills {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.3rem;
        scrollbar-width: none;
    }
    .filter-pills::-webkit-scrollbar {
        display: none;
    }

    .pill {
        padding: 0.35rem 0.75rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .report-search input {
        width: 100%;
    }

    .report-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }
}

/* Very Small Phones (max-width: 420px) */
@media (max-width: 420px) {
    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .live-metrics-grid {
        grid-template-columns: 1fr;
    }

    .brand-text h1 {
        font-size: 0.95rem;
    }
}

/* PRINT STYLES */
@media print {
    .navbar, .stepper-wrapper, .report-actions, .results-filter-bar, .app-footer, .btn, .btn-group { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .card { border: none !important; box-shadow: none !important; background: transparent !important; }
    .data-table th, .data-table td { color: #000 !important; border-color: #ddd !important; }
    .badge-status { border: 1px solid #999 !important; color: #000 !important; }
}

/* =========================================================================
   PING SETUP BAR & PACKETS SELECTOR (شريط ضبط عدد البكتات المنظم)
   ========================================================================= */
.ping-setup-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.65));
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

.setup-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.setup-col label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    margin: 0;
}

.chips-group {
    display: inline-flex;
    align-items: center;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3px;
    gap: 4px;
}

.chip {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.42rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.chip.active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.4);
}

.custom-packets-wrap {
    display: inline-flex;
    align-items: center;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0 0.5rem;
    transition: all 0.2s ease;
}

.custom-packets-wrap:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.custom-packets-wrap input.input-mini {
    width: 62px;
    background: transparent;
    border: none;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    padding: 0.4rem 0;
    outline: none;
}

.custom-packets-wrap .unit-tag {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
    padding-right: 0.2rem;
    user-select: none;
}

.setup-col.actions-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .ping-setup-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}

/* =========================================================================
   REPORTS ARCHIVE & ISOLATED RUNS STYLES (تصميم سجل الفحوصات المؤرشفة)
   ========================================================================= */
.reports-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.report-run-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.7));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.report-run-card:hover {
    border-color: #38bdf8;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.2);
}

.report-run-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.report-run-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.report-run-tower {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.report-run-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    background: rgba(2, 6, 23, 0.6);
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.run-metric-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.run-metric-item span {
    font-size: 0.73rem;
    color: #94a3b8;
    white-space: nowrap;
}

.run-metric-item strong {
    font-size: 1rem;
    font-weight: 800;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
}

.report-run-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-run-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.6rem;
    font-size: 0.84rem;
}

.btn-icon-del {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon-del:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* =========================================================================
   SUBSCRIBER SUBSCRIPTIONS STYLES
   ========================================================================= */
.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(6, 182, 212, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

/* =========================================================================
   OVERVIEW / GENERAL STATUS DASHBOARD STYLES
   ========================================================================= */
.overview-hero-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.overview-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.overview-hero-title h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.overview-hero-title p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.overview-badges-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.pulse-indicator-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

.live-clock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    border-radius: 20px;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

/* =========================================================================
   DIAGNOSTICS CAPABILITIES BANNER (Dynamic Router & System State)
   ========================================================================= */
.overview-status-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease-out;
}

.diag-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.diag-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: #f8fafc;
}

.diag-tag-offline {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
}

.diag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .diag-grid {
        grid-template-columns: 1fr;
    }
}

.diag-col {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
}

.diag-col-avail {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(6, 78, 59, 0.12);
}

.diag-col-unavail {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(127, 29, 29, 0.12);
}

.diag-col-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: #f8fafc;
}

.diag-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.diag-list li {
    font-size: 0.82rem;
    color: #cbd5e1;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.45;
}

/* =========================================================================
   6 CORE SERVICE CONNECTION & HEALTH CARDS (شبكة بطاقات خدمات البرج التفاعلية)
   ========================================================================= */
.service-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.service-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.65) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.35rem 1.45rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #34d399);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 16px 36px -8px rgba(14, 165, 233, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.service-card:hover::before {
    opacity: 1;
}

.srv-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.srv-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.service-card:hover .srv-icon-badge {
    transform: scale(1.08);
}

.srv-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.25s ease;
}

.status-pill-operational {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.status-pill-degraded {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.status-pill-offline {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    animation: pulse 2s infinite;
}

.srv-card-body {
    flex: 1;
    margin-bottom: 1.1rem;
}

.srv-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.srv-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 0.85rem 0;
}

.srv-metrics-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
}

.srv-metric-item small {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.srv-metric-item strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f1f5f9;
}

.srv-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-srv-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-srv-action:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border-color: #38bdf8;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-srv-info {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-srv-info:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

/* Modal Diag Banner Variants */
.diag-banner-ok {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.diag-banner-warn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.diag-banner-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.ovw-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
    min-width: 0;
}

.ovw-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 24px -4px rgba(6, 182, 212, 0.15);
}

.ovw-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.icon-cyan-glow {
    background: rgba(6, 182, 212, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.icon-green-glow {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.icon-yellow-glow {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.icon-purple-glow {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.ovw-card-content {
    flex: 1;
    min-width: 0;
}

.ovw-card-label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.ovw-card-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f8fafc;
    display: block;
    line-height: 1.2;
}

.ovw-card-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.3rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-2col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.telemetry-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.65) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.3rem 1.5rem;
    backdrop-filter: blur(12px);
    min-width: 0;
}

.telemetry-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
}

.telemetry-card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.telemetry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 0.55rem;
    min-width: 0;
}

.telemetry-item:last-child {
    margin-bottom: 0;
}

.telemetry-item-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    min-width: 0;
}

.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
}

.launchpad-tile {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.launchpad-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(14, 165, 233, 0.15) 100%);
}

.launchpad-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.launchpad-tile strong {
    font-size: 0.9rem;
    color: #f8fafc;
}

.launchpad-tile span {
    font-size: 0.75rem;
    color: #94a3b8;
}

@media (max-width: 1024px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .overview-2col-grid {
        grid-template-columns: 1fr;
    }
    .launchpad-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .overview-kpi-grid {
        grid-template-columns: 1fr;
    }
    .launchpad-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   WHATSAPP RENEWAL ACTION STYLES
   ========================================================================= */
.btn-whatsapp-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.32rem 0.65rem;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #25d366;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-whatsapp-mini:hover {
    background: #25d366;
    color: #030712;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    transform: translateY(-1px);
}

/* Category Filter Pills & Search */
.filter-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.filter-pills .pill {
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-pills .pill:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.filter-pills .pill.active {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.input-search-mini {
    padding: 0.45rem 0.9rem;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-search-mini:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

/* =========================================================================
   TOWER NETWORK & DEVICES MONITOR STYLES (مراقبة أجهزة البرج)
   ========================================================================= */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

.dude-device-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.dude-device-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(148, 163, 184, 0.4);
    transition: all 0.3s ease;
}

.dude-device-card.status-online {
    border-color: rgba(16, 185, 129, 0.3);
}
.dude-device-card.status-online::before {
    background: linear-gradient(90deg, #10b981, #34d399);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.dude-device-card.status-warning {
    border-color: rgba(245, 158, 11, 0.35);
}
.dude-device-card.status-warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.dude-device-card.status-down {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(30, 15, 20, 0.85) 0%, rgba(45, 20, 30, 0.7) 100%);
}
.dude-device-card.status-down::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}

.dude-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.dude-card-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1;
}

.dude-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.status-online .dude-card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

.status-warning .dude-card-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.status-down .dude-card-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.dude-device-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dude-ip-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.18rem 0.55rem;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.76rem;
    font-family: 'JetBrains Mono', monospace;
    color: #38bdf8;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dude-ip-pill:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
}

.dude-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin: 0.85rem 0;
    padding: 0.65rem 0.5rem;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    text-align: center;
}

.dude-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dude-metric-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 600;
}

.dude-metric-val {
    font-size: 0.88rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: #f8fafc;
}

.dude-sparkline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.dude-sparkline-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sparkline-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    transition: all 0.2s ease;
}

.sparkline-dot.dot-online {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.sparkline-dot.dot-warning {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.sparkline-dot.dot-down {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.dude-card-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dude-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dude-action-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.dude-action-btn.btn-del:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.dude-location-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dude-location-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dude-add-card-tile {
    background: rgba(15, 23, 42, 0.4);
    border: 2px dashed rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 210px;
    text-align: center;
    box-sizing: border-box;
}

.dude-add-card-tile:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: #38bdf8;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.dude-add-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.dude-add-card-tile:hover .dude-add-card-icon {
    background: #38bdf8;
    color: #030712;
    transform: scale(1.1);
}

/* =========================================================================
   GLOBAL MODAL STYLES (CENTERED FIXED VIEWPORT MODALS)
   ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1.5rem;
    box-sizing: border-box;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.96) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.15);
    width: 100%;
    max-width: 520px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header .header-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.modal-header .header-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

/* =========================================================================
   MOBILE HEADER & BACKDROP STYLING
   ========================================================================= */
.mobile-top-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 95;
    margin: -1.25rem -1.4rem 1.25rem -1.4rem;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:active {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--primary);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mobile-brand-title {
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mobile-conn-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
}

.mobile-btn-icon.btn-logout {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(6px);
    z-index: 998;
    transition: opacity 0.25s ease;
}

/* =========================================================================
   RESPONSIVE SCALING & 100% BROWSER ZOOM FIX
   ========================================================================= */
@media (max-width: 1366px) {
    .main-workspace {
        padding: 1.25rem 1.4rem;
    }
    .sidebar-nav {
        width: 235px;
        min-width: 235px;
        max-width: 235px;
    }
    .overview-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
        gap: 0.85rem;
    }
    .ovw-card {
        padding: 1rem 1.1rem;
        gap: 0.85rem;
    }
    .ovw-card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .overview-2col-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   IPAD & TABLET OPTIMIZATIONS (769px to 1024px)
   ========================================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar-nav {
        width: 215px;
        min-width: 215px;
        max-width: 215px;
    }
    .overview-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.85rem;
    }
    .overview-2col-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .dude-header-kpis {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
    .dude-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 0.85rem;
    }
    .subscribers-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .launchpad-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .table-container, .table-card {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================================================
   MOBILE PHONES & SMALL SCREENS (< 768px)
   ========================================================================= */
@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
        margin: -0.85rem -0.75rem 1rem -0.75rem;
    }

    .app-layout {
        flex-direction: column;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Off-canvas Slide-out Drawer for Sidebar */
    .sidebar-nav {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        right: -300px !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        box-shadow: none;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        background: #0b1120 !important;
    }

    .sidebar-nav.mobile-open {
        right: 0 !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
    }

    .main-workspace {
        padding: 0.85rem 0.75rem 2rem 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        max-height: none !important;
    }

    /* Hero & Titles */
    .overview-hero-card {
        padding: 1.15rem 1rem !important;
    }
    .overview-hero-title h2 {
        font-size: 1.25rem !important;
        flex-wrap: wrap;
    }
    .overview-hero-title p {
        font-size: 0.85rem !important;
    }
    .overview-badges-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    /* KPI Grids -> 2 columns on phones */
    .overview-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    .ovw-card {
        padding: 0.85rem 0.75rem !important;
        gap: 0.6rem !important;
    }
    .ovw-card-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.05rem !important;
    }
    .ovw-card-val {
        font-size: 1.25rem !important;
    }
    .ovw-card-label {
        font-size: 0.75rem !important;
    }
    .ovw-card-sub {
        font-size: 0.68rem !important;
    }

    /* Launchpad & Quick Links */
    .launchpad-grid {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }
    .launchpad-card {
        padding: 0.9rem !important;
    }

    /* The Dude & Devices Monitor */
    .dude-header-card {
        padding: 1rem !important;
    }
    .dude-header-kpis {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    .dude-kpi-item {
        padding: 0.6rem !important;
    }
    .dude-kpi-num {
        font-size: 1.2rem !important;
    }
    .devices-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    .dude-filter-tabs {
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .devices-toolbar-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    .devices-toolbar-actions .btn, .devices-toolbar-actions .search-box-devices {
        width: 100% !important;
    }
    .dude-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    .dude-device-card {
        padding: 0.75rem 0.65rem !important;
    }

    /* Stepper Workflow */
    .stepper-wrapper {
        padding: 0.8rem 0.6rem !important;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    .step-item {
        min-width: 110px;
    }
    .step-label {
        font-size: 0.72rem !important;
    }

    /* SAS Ping & Active Testing View */
    .test-actions-bar {
        flex-direction: column !important;
        gap: 0.6rem !important;
    }
    .test-actions-bar .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .ping-waveform-canvas {
        height: 80px !important;
    }
    .live-kpis-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    /* Tables in Users, Subscriptions, Reports */
    .table-container, .table-card, .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
    }
    .table-container table, .table-card table {
        min-width: 580px;
    }

    /* Modals & Dialogs */
    .modal-card {
        width: 94vw !important;
        max-width: 94vw !important;
        margin: 1rem auto !important;
        padding: 0 !important;
        border-radius: var(--radius-md) !important;
    }
    .modal-header {
        padding: 0.9rem 1rem !important;
    }
    .modal-body {
        padding: 1.15rem 1rem !important;
    }
    .modal-footer {
        padding: 0.9rem 1rem !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    .modal-footer .btn {
        width: 100% !important;
    }

    /* Login Screen */
    .login-wrapper {
        padding: 1rem !important;
    }
    .login-card {
        padding: 1.75rem 1.25rem !important;
    }
}

/* =========================================================================
   COMPREHENSIVE PREMIUM LIGHT THEME DESIGN SYSTEM (الوضع النهاري الفاخر)
   ========================================================================= */
body.light-theme {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-subtle: #e2e8f0;
    --border-color: #e2e8f0;
    --border-accent: rgba(2, 132, 199, 0.4);
    
    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.25);
    --primary-hover: #0369a1;
    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.2);
    
    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 8px 24px -4px rgba(0, 0, 0, 0.04);
    background-color: #f8fafc !important;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(124, 58, 237, 0.04) 0%, transparent 40%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #0f172a !important;
}

/* Layout & Top Navbar */
body.light-theme .app-layout {
    background: #f1f5f9 !important;
}

body.light-theme .desktop-top-bar,
body.light-theme .mobile-top-bar {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .top-bar-breadcrumb span,
body.light-theme .mobile-brand-title {
    color: #0f172a !important;
    font-weight: 800 !important;
}

body.light-theme .connection-pill,
body.light-theme .top-btn-pill,
body.light-theme .top-btn-icon,
body.light-theme .mobile-btn-icon,
body.light-theme .mobile-menu-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

body.light-theme .top-btn-icon:hover,
body.light-theme .top-btn-pill:hover,
body.light-theme .mobile-btn-icon:hover {
    background: #f1f5f9 !important;
    color: #0284c7 !important;
    border-color: #94a3b8 !important;
}

/* Sidebar */
body.light-theme .sidebar-nav {
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .sidebar-brand {
    border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .sidebar-brand .brand-text h1 {
    color: #0f172a !important;
    background: linear-gradient(135deg, #0f172a, #0284c7) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

body.light-theme .sidebar-brand .brand-text span {
    color: #64748b !important;
}

body.light-theme .nav-item {
    color: #475569 !important;
}

body.light-theme .nav-item:hover {
    background: #f8fafc !important;
    color: #0284c7 !important;
}

body.light-theme .nav-item.active {
    background: rgba(2, 132, 199, 0.09) !important;
    color: #0284c7 !important;
    border-right-color: #0284c7 !important;
    font-weight: 800 !important;
}

body.light-theme .sidebar-footer {
    border-top: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

body.light-theme .client-widget {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .client-widget-info strong {
    color: #0f172a !important;
}

/* Hero Banners & Section Headers */
body.light-theme .overview-hero-card,
body.light-theme .hero-banner-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: var(--shadow-card) !important;
}

body.light-theme .hero-title-main,
body.light-theme .hero-title h2,
body.light-theme .header-title h3,
body.light-theme .section-title {
    color: #0f172a !important;
}

body.light-theme .hero-sub-text,
body.light-theme .hero-desc,
body.light-theme .header-title p {
    color: #475569 !important;
}

/* Cards across the app */
body.light-theme .ovw-card,
body.light-theme .card,
body.light-theme .section-panel,
body.light-theme .table-card,
body.light-theme .modal-card,
body.light-theme .launchpad-card,
body.light-theme .sub-stat-card,
body.light-theme .acc-kpi-card,
body.light-theme .report-run-card,
body.light-theme .login-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: var(--shadow-card) !important;
}

body.light-theme .ovw-card:hover,
body.light-theme .launchpad-card:hover,
body.light-theme .acc-kpi-card:hover,
body.light-theme .report-run-card:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .ovw-card-val,
body.light-theme .acc-kpi-val,
body.light-theme .dude-kpi-num,
body.light-theme .metric-value,
body.light-theme .stat-card-val {
    color: #0f172a !important;
}

body.light-theme .ovw-card-label,
body.light-theme .acc-kpi-header,
body.light-theme .launchpad-info p,
body.light-theme .ovw-card-sub,
body.light-theme .acc-kpi-sub {
    color: #64748b !important;
}

/* Service Diagnostics Cards in Overview */
body.light-theme .service-diag-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .service-diag-card:hover {
    background: #f8fafc !important;
    border-color: #0284c7 !important;
}

body.light-theme .srv-title {
    color: #0f172a !important;
}

body.light-theme .srv-desc {
    color: #64748b !important;
}

body.light-theme .srv-stat-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .srv-stat-box small {
    color: #64748b !important;
}

body.light-theme .srv-stat-box strong {
    color: #0284c7 !important;
}

body.light-theme .srv-action-link {
    color: #0284c7 !important;
    font-weight: 700 !important;
}

/* WAN Feeder & Radar DNS Target Cards */
body.light-theme .wan-feeder-card,
body.light-theme .wan-target-card,
body.light-theme .dns-node-card,
body.light-theme .dude-device-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .wan-feeder-card:hover,
body.light-theme .wan-target-card:hover,
body.light-theme .dude-device-card:hover {
    background: #f8fafc !important;
    border-color: #0284c7 !important;
}

body.light-theme .wan-feeder-card h3,
body.light-theme .wan-target-card h3,
body.light-theme .dns-node-card h3,
body.light-theme .dude-device-name,
body.light-theme .target-name,
body.light-theme .feeder-title {
    color: #0f172a !important;
    font-weight: 800 !important;
}

body.light-theme .wan-feeder-card p,
body.light-theme .wan-target-card p,
body.light-theme .target-ip,
body.light-theme .feeder-sub,
body.light-theme .metric-label {
    color: #64748b !important;
}

body.light-theme .metric-val-ping,
body.light-theme .target-ping-val {
    color: #0284c7 !important;
    font-weight: 800 !important;
}

body.light-theme .status-tag-ready,
body.light-theme .status-ready-badge {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    font-weight: 700 !important;
}

/* Filter Pill Tabs in Light Theme */
body.light-theme .dude-filter-tabs {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
}

body.light-theme .dude-filter-tab {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

body.light-theme .dude-filter-tab:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

body.light-theme .dude-filter-tab.active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

body.light-theme .dude-filter-tab .badge-count {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

body.light-theme .dude-filter-tab.active .badge-count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* Tables in Light Theme */
body.light-theme .table-responsive,
body.light-theme .users-table-container,
body.light-theme .table-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .data-table th,
body.light-theme .table thead th,
body.light-theme .report-table thead th,
body.light-theme .admin-table thead th {
    background: #f8fafc !important;
    color: #334155 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-weight: 800 !important;
}

body.light-theme .data-table td,
body.light-theme .table tbody td,
body.light-theme .report-table tbody td,
body.light-theme .admin-table tbody td {
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
}

body.light-theme .data-table tr:hover td,
body.light-theme .table tbody tr:hover td,
body.light-theme .report-table tbody tr:hover td,
body.light-theme .admin-table tbody tr:hover td {
    background: #f8fafc !important;
}

body.light-theme .data-table td strong,
body.light-theme .table td strong,
body.light-theme .report-table td strong {
    color: #0284c7 !important;
}

body.light-theme .ip-badge {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
}

body.light-theme .mac-badge {
    color: #64748b !important;
}

/* Badges in Light Theme */
body.light-theme .badge-active,
body.light-theme .status-badge-active {
    background: #d1fae5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    font-weight: 700 !important;
}

body.light-theme .badge-expired,
body.light-theme .status-badge-expired {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    font-weight: 700 !important;
}

body.light-theme .badge-expiring,
body.light-theme .status-badge-expiring {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    font-weight: 700 !important;
}

body.light-theme .role-badge,
body.light-theme .role-operator {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .btn-whatsapp-mini {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

body.light-theme .btn-whatsapp-mini:hover {
    background: #22c55e !important;
    color: #ffffff !important;
}

/* Search inputs & Form Controls */
body.light-theme .search-box-devices,
body.light-theme .search-box,
body.light-theme .search-input,
body.light-theme .input-search-mini,
body.light-theme .form-control,
body.light-theme input[type="text"],
body.light-theme input[type="password"],
body.light-theme select {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .search-box-devices input,
body.light-theme .search-box input {
    background: transparent !important;
    color: #0f172a !important;
}

body.light-theme .search-box-devices input::placeholder,
body.light-theme .search-box input::placeholder,
body.light-theme input::placeholder {
    color: #94a3b8 !important;
}

body.light-theme .text-cyan,
body.light-theme .text-purple {
    color: #0284c7 !important;
}

body.light-theme .text-emerald {
    color: #059669 !important;
}

body.light-theme .text-yellow {
    color: #d97706 !important;
}

body.light-theme .text-danger {
    color: #dc2626 !important;
}

/* =========================================================================
   LIGHT THEME ULTRA-CONTRAST MASTER INLINE OVERRIDES (قوة التباين الفائقة)
   ========================================================================= */
body.light-theme [style*="color: #f8fafc"],
body.light-theme [style*="color: #fff"],
body.light-theme [style*="color: #ffffff"],
body.light-theme [style*="color:#f8fafc"],
body.light-theme [style*="color:#fff"],
body.light-theme [style*="color:#ffffff"] {
    color: #0f172a !important;
}

body.light-theme [style*="color: #94a3b8"],
body.light-theme [style*="color: #64748b"],
body.light-theme [style*="color:#94a3b8"],
body.light-theme [style*="color:#64748b"] {
    color: #475569 !important;
}

body.light-theme [style*="color: #38bdf8"],
body.light-theme [style*="color: #0ea5e9"],
body.light-theme [style*="color: #a5f3fc"],
body.light-theme [style*="color: #67e8f9"],
body.light-theme [style*="color:#38bdf8"],
body.light-theme [style*="color:#0ea5e9"],
body.light-theme [style*="color:#a5f3fc"],
body.light-theme [style*="color:#67e8f9"] {
    color: #0284c7 !important;
    font-weight: 700 !important;
}

body.light-theme [style*="color: #34d399"],
body.light-theme [style*="color: #10b981"],
body.light-theme [style*="color: #6ee7b7"],
body.light-theme [style*="color:#34d399"],
body.light-theme [style*="color:#10b981"] {
    color: #047857 !important;
    font-weight: 700 !important;
}

body.light-theme [style*="color: #fbbf24"],
body.light-theme [style*="color: #f59e0b"],
body.light-theme [style*="color: #fde68a"],
body.light-theme [style*="color:#fbbf24"],
body.light-theme [style*="color:#f59e0b"] {
    color: #b45309 !important;
    font-weight: 700 !important;
}

body.light-theme [style*="color: #f87171"],
body.light-theme [style*="color: #ef4444"],
body.light-theme [style*="color: #fca5a5"],
body.light-theme [style*="color:#f87171"],
body.light-theme [style*="color:#ef4444"] {
    color: #b91c1c !important;
    font-weight: 700 !important;
}

body.light-theme [style*="color: #c084fc"],
body.light-theme [style*="color: #a855f7"],
body.light-theme [style*="color: #818cf8"],
body.light-theme [style*="color:#c084fc"],
body.light-theme [style*="color:#a855f7"] {
    color: #6d28d9 !important;
    font-weight: 700 !important;
}

/* Background Overrides for Light Theme */
body.light-theme [style*="background: rgba(15, 23, 42"],
body.light-theme [style*="background: rgba(30, 41, 59"],
body.light-theme [style*="background:#0f172a"],
body.light-theme [style*="background:#1e293b"],
body.light-theme [style*="background: #0f172a"],
body.light-theme [style*="background: #1e293b"],
body.light-theme [style*="background: #090d16"] {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-theme [style*="background: rgba(255, 255, 255, 0.05)"],
body.light-theme [style*="background: rgba(255, 255, 255, 0.08)"],
body.light-theme [style*="background: rgba(255, 255, 255, 0.03)"],
body.light-theme [style*="background: rgba(255, 255, 255, 0.1)"] {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

body.light-theme [style*="border: 1px solid rgba(255, 255, 255"],
body.light-theme [style*="border: 1px dashed rgba(255, 255, 255"] {
    border-color: #cbd5e1 !important;
}

/* Light Theme Universal Typography Contrast */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme strong:not(.btn *):not(.badge *):not(.badge-count) {
    color: #0f172a !important;
}

body.light-theme p,
body.light-theme span:not(.btn *):not(.badge *):not(.badge-count):not(.role-badge):not(.badge-tag):not(.badge-counter):not(.srv-status-pill),
body.light-theme small:not(.btn *):not(.badge *) {
    color: #334155;
}

/* Table Text & Links */
body.light-theme td strong {
    color: #0284c7 !important;
}

body.light-theme td small {
    color: #64748b !important;
}

/* =========================================================================
   AGENT ACCOUNTING & FINANCIAL MANAGEMENT STYLES (حسابات وأرباح الوكيل)
   ========================================================================= */

.acc-kpi-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.acc-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
}

.acc-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.acc-kpi-card.kpi-expected::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.acc-kpi-card.kpi-collected::before { background: linear-gradient(90deg, #10b981, #34d399); }
.acc-kpi-card.kpi-debts::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.acc-kpi-card.kpi-expenses::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.acc-kpi-card.kpi-profit::before { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }

.acc-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 0.86rem;
    font-weight: 700;
}

.acc-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.05);
}

.kpi-expected .acc-kpi-icon { color: #818cf8; background: rgba(99, 102, 241, 0.12); }
.kpi-collected .acc-kpi-icon { color: #34d399; background: rgba(16, 185, 129, 0.12); }
.kpi-debts .acc-kpi-icon { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.kpi-expenses .acc-kpi-icon { color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.kpi-profit .acc-kpi-icon { color: #38bdf8; background: rgba(14, 165, 233, 0.12); }

.acc-kpi-val {
    font-size: 1.55rem;
    font-weight: 900;
    color: #f8fafc;
    font-family: 'JetBrains Mono', inherit;
    letter-spacing: -0.5px;
    margin: 0.2rem 0;
}

.acc-kpi-sub {
    font-size: 0.78rem;
    color: #64748b;
}

/* Tabs */
.acc-tab-btn {
    padding: 0.65rem 1.1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.acc-tab-btn:hover {
    color: #f8fafc;
}

.acc-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

.badge-counter {
    padding: 0.15rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
}

.acc-tab-btn.active .badge-counter {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

/* Payment Status Badges */
.badge-pay-paid {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-pay-unpaid {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-pay-partial {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Action buttons */
.btn-action-pay {
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-action-pay:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.03);
}

.btn-action-wa {
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #25d366;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-action-wa:hover {
    background: rgba(37, 211, 102, 0.25);
    transform: scale(1.03);
}

.btn-action-del {
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-del:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* =========================================================================
   13. MULTI-LANGUAGE (ARABIC / ENGLISH) STYLING & LTR SUPPORT
   ========================================================================= */

body.lang-en {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body.lang-en .sidebar-brand .brand-text h1,
body.lang-en .overview-hero-title h2,
body.lang-en .srv-title,
body.lang-en .login-header h2 {
    letter-spacing: -0.02em;
}

/* Login Screen Language Selector */
.login-lang-switch {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0.25rem;
    width: fit-content;
    margin: 0 auto 1.25rem auto;
}

.login-lang-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.login-lang-pill:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.login-lang-pill.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

/* Sidebar & Header Language Toggle Button */
.btn-lang-toggle {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lang-toggle:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.4);
    color: #38bdf8;
    transform: translateY(-1px);
}

/* =========================================================================
   TABLE CONTAINER & ANTI-CLIPPING RESPONSIVE STYLES
   ========================================================================= */
.content-section, #secAccounting, .client-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

.table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.table-container table {
    width: 100% !important;
    min-width: 860px;
    border-collapse: collapse;
}

.acc-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* =========================================================================
   AGENT NOTIFICATIONS & SMART ALERTS HUB STYLES
   ========================================================================= */
.notif-bell-btn {
    position: relative !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-bell-btn:hover {
    color: #38bdf8 !important;
    transform: scale(1.08);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    text-align: center;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
    animation: notifPulse 2s infinite;
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
}

@keyframes notifPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notif-hub-dialog {
    max-width: 620px !important;
    width: 100% !important;
    max-height: 86vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.15) !important;
    border-radius: 18px !important;
}

.notif-item-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.notif-item-card:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.notif-item-card.unread {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(14, 165, 233, 0.12));
    border-right: 4px solid #38bdf8 !important;
}

[dir="ltr"] .notif-item-card.unread {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 4px solid #38bdf8 !important;
}

.notif-item-card.critical {
    border-right-color: #ef4444 !important;
}
[dir="ltr"] .notif-item-card.critical {
    border-left-color: #ef4444 !important;
}

.notif-item-card.warning {
    border-right-color: #f59e0b !important;
}
[dir="ltr"] .notif-item-card.warning {
    border-left-color: #f59e0b !important;
}

.notif-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.notif-card-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.notif-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-icon-critical {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.notif-icon-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.notif-icon-info {
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.notif-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.notif-time-badge {
    font-size: 0.74rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    font-family: inherit;
}

.notif-message {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

.notif-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.3rem;
}

.notif-action-jump {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    transition: all 0.2s ease;
}

.notif-action-jump:hover {
    background: rgba(56, 189, 248, 0.28);
    color: #ffffff;
    border-color: #38bdf8;
}
/* =========================================================================
   SUBSCRIBER EDIT MODE (Dropdown & Actions)
   ========================================================================= */

.sub-action-cell {
    position: relative;
    text-align: center;
}

.btn-action-trigger {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-trigger:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.action-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%) translateY(5px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 200px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(10px);
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s;
    width: 100%;
}

.action-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #38bdf8;
}

.action-menu-item.danger {
    color: #f87171;
}

.action-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.action-menu-item.success {
    color: #34d399;
}

.action-menu-item.success:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.top-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-card-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: right;
}

.action-card-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-card-btn.highlight {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.3);
}

.action-card-btn.highlight:hover {
    background: rgba(234, 179, 8, 0.2);
}

.action-card-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.action-card-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.action-card-btn.danger-outline {
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.action-card-btn.danger-outline:hover {
    background: rgba(239, 68, 68, 0.15);
}

.action-card-btn.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.action-card-btn.success:hover {
    background: rgba(16, 185, 129, 0.2);
}

.action-card-btn i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}
