:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-subtle: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dark: #1e293b;
    --accent-blue: #2563eb;
    --accent-blue-light: #eff6ff;
    --accent-blue-border: #bfdbfe;
    --accent-cyan: #0891b2;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #dc2626;
    --accent-purple: #7c3aed;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -4px rgba(15, 23, 42, 0.04);
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* LOGIN STYLING */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #e2e8f0 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px 44px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-header {
    text-align: center;
    margin-bottom: 32px;
}

.brand-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.brand-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.domain-badge {
    display: inline-block;
    margin-top: 12px;
    background: #ecfeff;
    color: var(--accent-cyan);
    border: 1px solid #cffafe;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 22px;
}

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

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn {
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-block {
    width: 100%;
}

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

.btn-danger {
    background: #fef2f2;
    color: var(--accent-rose);
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: var(--accent-rose);
    color: #ffffff;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.hidden {
    display: none !important;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
}

/* INTERACTIVE IP CLICK LINK */
.ip-click-link {
    color: var(--accent-blue);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    transition: all 0.2s ease;
}

.ip-click-link:hover {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* MODAL OVERLAY & CONTAINER */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}

.modal-close-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: var(--accent-rose);
    color: #ffffff;
}

.info-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
}

.info-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 700;
}

/* LAYOUT MAIN DASHBOARD */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 265px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 26px;
}

.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sidebar-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.sidebar-title span {
    font-size: 11px;
    color: var(--accent-blue);
    display: block;
    font-weight: 600;
    margin-top: 1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-icon-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25); }
.nav-icon-emerald { background: linear-gradient(135deg, #10b981, #047857); color: #fff; box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25); }
.nav-icon-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 3px 10px rgba(139, 92, 246, 0.25); }
.nav-icon-cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); color: #fff; box-shadow: 0 3px 10px rgba(6, 182, 212, 0.25); }
.nav-icon-rose { background: linear-gradient(135deg, #f43f5e, #be123c); color: #fff; box-shadow: 0 3px 10px rgba(244, 63, 94, 0.25); }
.nav-icon-amber { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25); }
.nav-icon-slate { background: linear-gradient(135deg, #475569, #1e293b); color: #fff; box-shadow: 0 3px 10px rgba(71, 85, 105, 0.25); }

.nav-link:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.nav-link:hover .nav-icon-badge {
    transform: scale(1.08);
}

.nav-link.active {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    font-weight: 700;
}

.user-profile {
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    font-size: 13px;
}

.user-name {
    font-weight: 700;
    color: var(--text-main);
}

.user-role-badge {
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    margin-top: 2px;
}

.badge-admin {
    background: #f3e8ff;
    color: var(--accent-purple);
    border: 1px solid #e9d5ff;
}

.badge-operator {
    background: #e0f2fe;
    color: var(--accent-cyan);
    border: 1px solid #bae6fd;
}

.main-content {
    margin-left: 265px;
    flex-grow: 1;
    padding: 36px 40px;
    max-width: calc(100vw - 265px);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.page-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.top-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    color: var(--accent-emerald);
    font-weight: 700;
}

.dot-online {
    width: 8px;
    height: 8px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}

.fill-blue {
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.fill-purple {
    background: linear-gradient(90deg, #c084fc, #7c3aed);
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

/* PRINT PDF CSS MEDIA RULES */
@media print {
    .sidebar, .top-status, .btn, .modal-close-btn, form, input, select, label {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .panel {
        border: 1px solid #000000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .custom-table th, .custom-table td {
        border-bottom: 1px solid #000000 !important;
    }
}

/* NETSCOUT MAP CYBER NOC STYLING */
.netscout-header {
    background: #0f172a;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    color: #f8fafc;
}

.netscout-title {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.netscout-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-rose { background: #f43f5e; box-shadow: 0 0 8px #f43f5e; }
.dot-cyan { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

.threat-feed-list-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.threat-feed-item {
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
}

.feed-judol {
    border-left: 4px solid #f43f5e;
    background: rgba(244, 63, 94, 0.08);
}

.feed-normal {
    border-left: 4px solid #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.feed-time {
    color: #64748b;
    font-size: 11px;
}

.feed-ip {
    color: #f1f5f9;
}

.feed-arrow {
    color: #64748b;
}

.feed-target {
    color: #38bdf8;
    font-weight: 600;
}

.feed-location {
    color: #94a3b8;
    font-size: 11px;
}

.feed-badge-judol {
    background: rgba(244, 63, 94, 0.2);
    color: #f43f5e;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 10px;
    margin-left: auto;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.feed-badge-normal {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 10px;
    margin-left: auto;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* STATS CARDS & PANELS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-bottom: 32px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

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

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.card-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-box-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3); }
.icon-box-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3); }
.icon-box-cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); color: #fff; box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3); }
.icon-box-rose { background: linear-gradient(135deg, #f43f5e, #be123c); color: #fff; box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3); }
.icon-box-slate { background: linear-gradient(135deg, #475569, #1e293b); color: #fff; box-shadow: 0 4px 14px rgba(71, 85, 105, 0.3); }

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.card-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.card-judol-alert {
    border-color: #fca5a5;
    background: #fffdfd;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 14px;
}

.panel-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.custom-table th {
    text-align: left;
    padding: 14px 20px;
    color: var(--text-dark);
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    background: #f8fafc;
    letter-spacing: 0.2px;
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    vertical-align: middle;
}

.custom-table tbody tr {
    transition: background 0.15s ease;
}

.custom-table tbody tr:hover {
    background: #f8fafc;
}

.badge-risk {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.risk-high {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.risk-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.risk-safe {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
