/* ==========================================================================
   BERKAHMON - Tema Navy & Merah (PT. Internet Berkah Sulawesi)
   ========================================================================== */

:root {
    /* BERKAHMON - warna dari logo PT. Internet Berkah Sulawesi */
    --brand-navy: #334F7D;
    --brand-red: #ED3237;
    --brand-red-dark: #C9252A;
    --primary-color: #3D6199;
    --primary-dark: #334F7D;
    --accent-color: #ED3237;
    --secondary-color: #6B7A94;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #7FA3DB;
    --dark-bg: #0C1628;
    --dark-surface: #14223B;
    --dark-card: #1C2E4F;
    --dark-border: #2C4268;
    --text-light: #F4F6FA;
    --text-muted: #A9B7CE;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.container-fluid, .container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-surface) 100%);
    min-height: 100vh;
}

.login-container {
    background: var(--dark-surface);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--dark-border);
    max-width: 450px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--brand-navy), var(--brand-red), var(--brand-navy));
    border-radius: 1.5rem;
    z-index: -1;
    opacity: 0.3;
}

.login-logo {
    margin-bottom: 1.5rem;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(61, 97, 153, 0.4);
    animation: pulse 2s infinite ease-in-out;
}

.logo-circle i {
    font-size: 2rem;
    color: white;
}

.login-title {
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--text-light), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.login-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-navy), var(--brand-red));
    border-radius: 2px;
    margin: 1.5rem auto 2rem;
    animation: shimmer 2s infinite ease-in-out;
}

.login-form .form-label {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    background-color: var(--dark-card) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--text-light) !important;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: var(--dark-card) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(61, 97, 153, 0.25) !important;
}

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

/* Floating Labels */
.form-floating > label {
    color: var(--text-muted) !important;
    font-weight: 500;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.form-floating {
    position: relative;
}

/* Input group with floating labels */
.input-group .form-floating {
    position: relative;
}

.input-group .form-control.border-end-0 {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn.border-start-0 {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none !important;
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
    color: var(--text-muted) !important;
}

.input-group .btn.border-start-0:hover {
    background-color: var(--dark-border) !important;
    color: var(--primary-color) !important;
}

.input-group .btn.border-start-0:focus {
    box-shadow: 0 0 0 0.2rem rgba(61, 97, 153, 0.25) !important;
    background-color: var(--dark-card) !important;
    border-color: var(--primary-color) !important;
}

/* Ensure floating label works with input group */
.input-group .form-floating > label {
    color: var(--text-muted) !important;
    font-weight: 500;
}

.input-group .form-floating > .form-control:focus ~ label,
.input-group .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.form-select {
    background-color: var(--dark-card) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--text-light) !important;
}

.form-select:focus {
    background-color: var(--dark-card) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(61, 97, 153, 0.25) !important;
}

.form-select option {
    background-color: var(--dark-card) !important;
    color: var(--text-light) !important;
}

.form-check-label {
    color: var(--text-light) !important;
}

.form-text {
    color: var(--text-muted) !important;
}

.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--dark-border);
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: var(--text-light);
    background-color: var(--dark-border);
    border-color: var(--dark-border);
}

.login-btn {
    font-size: 1.1rem;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem rgba(61, 97, 153, 0.4);
}

.btn-loading {
    display: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: inline;
}

.default-credentials {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
}

.credential {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.login-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
}

.login-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-bg > div {
    position: relative;
    z-index: 1;
}

.hero-animation {
    position: relative;
    margin-bottom: 3rem;
}

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

.connection-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.line {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    animation: pulse-line 2s infinite ease-in-out;
}

.line-1 {
    width: 60px;
    height: 2px;
    top: 30%;
    left: -30px;
    animation-delay: 0s;
}

.line-2 {
    width: 2px;
    height: 80px;
    top: -40px;
    left: 50%;
    animation-delay: 0.7s;
}

.line-3 {
    width: 60px;
    height: 2px;
    bottom: 30%;
    right: -30px;
    animation-delay: 1.4s;
}

.hero-title {
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.feature-list {
    text-align: left;
    display: inline-block;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

.feature-item i {
    color: var(--success-color);
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #f5c2c7;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffecb5;
    border-left: 4px solid var(--warning-color);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #d1e7dd;
    border-left: 4px solid var(--success-color);
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #b8daff;
    border-left: 4px solid var(--info-color);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 1rem 0;
    background-color: rgba(12, 22, 40, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--dark-border);
}

/* Admin Panel Styles */
.admin-body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-surface) 100%);
    padding-top: 0;
    min-height: 100vh;
}

.sidebar {
    background: var(--dark-surface);
    min-height: 100vh;
    border-right: 1px solid var(--dark-border);
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--dark-card), var(--dark-surface));
    border-bottom: 1px solid var(--dark-border);
    position: relative;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(61, 97, 153, 0.3);
}

.brand-icon i {
    font-size: 1.25rem;
    color: white;
}

.sidebar-brand {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-brand:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.sidebar-brand:hover .brand-subtitle {
    color: var(--text-light);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--text-light);
    background: linear-gradient(90deg, rgba(61, 97, 153, 0.25), transparent);
    border-left-color: var(--accent-color);
    transform: translateX(2px);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(237, 50, 55, 0.22), rgba(61, 97, 153, 0.08));
    border-left-color: var(--accent-color);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    right: 1rem;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
}

.nav-link i {
    font-size: 1.1rem;
    width: auto;
}

.nav-divider {
    height: 1px;
    background: var(--dark-border);
    margin: 1rem 1.5rem;
}

.logout-link {
    color: var(--danger-color) !important;
    margin-top: 1rem;
}

.logout-link:hover {
    color: white !important;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.2), transparent);
    border-left-color: var(--danger-color);
}

.main-content {
    background: transparent;
    min-height: 100vh;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--dark-surface), var(--dark-card));
    border-radius: 1rem;
    border: 1px solid var(--dark-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color), var(--success-color));
}

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

.header-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(61, 97, 153, 0.3);
}

.header-icon i {
    font-size: 1.75rem;
    color: white;
}

.header-text {
    flex: 1;
}

.page-title {
    color: var(--text-light) !important;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-muted) !important;
    font-size: 1rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--dark-card);
    border-radius: 0.75rem;
    border: 1px solid var(--dark-border);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-status 2s infinite;
}

.status-indicator.online {
    background: var(--success-color);
}

.status-indicator.offline {
    background: var(--danger-color);
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Ensure all text elements are visible */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-light) !important;
}

p, span, div, label {
    color: var(--text-light);
}

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

.text-light {
    color: var(--text-light) !important;
}

small {
    color: var(--text-muted) !important;
}

/* Enhanced Card Styles */
.card {
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.enhanced-card {
    background: linear-gradient(135deg, var(--dark-surface), var(--dark-card));
    border: 1px solid var(--dark-border);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    opacity: 0.8;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--dark-border);
    padding: 1.5rem 1.25rem 1rem;
    font-weight: 600;
}

.card-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(61, 97, 153, 0.3);
}

.card-icon.telegram-icon {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.card-icon i {
    font-size: 1.25rem;
    color: white;
}

.card-title-group h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-light);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.card-body {
    padding: 1.5rem 1.25rem;
    color: var(--text-light) !important;
}

.card-title {
    color: var(--text-light) !important;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-muted) !important;
}

.card-body h6,
.card-body p,
.card-body span,
.card-body label {
    color: var(--text-light) !important;
}

/* Service Cards */
.service-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--dark-border);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.service-card:hover::before {
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

.service-header {
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.service-icon.l2tp {
    color: var(--success-color);
}

.service-icon.pptp {
    color: var(--warning-color);
}

.service-icon.sstp {
    color: var(--info-color);
}

.service-name {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

.service-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    display: inline-block;
}

.service-status.online {
    background: rgba(25, 135, 84, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.service-status.offline {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.service-btn {
    width: 100%;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.service-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Table Styles */
.table {
    color: var(--text-light);
    margin-bottom: 0;
}

.table th {
    border-color: var(--dark-border);
    background-color: var(--dark-card);
    font-weight: 600;
    padding: 1rem 0.75rem;
}

.table td {
    border-color: var(--dark-border);
    padding: 0.75rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(61, 97, 153, 0.1);
}

/* Button Groups and Actions */
.btn-group .btn {
    border-radius: 0.375rem;
    margin-right: 0.25rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Status Indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--secondary-color);
}

.status-disabled {
    color: var(--danger-color);
}

.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* Section Styles */
.profile-section, .quick-actions {
    margin-bottom: 1.5rem;
}

.section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dark-border);
}

.section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.profile-btn {
    border-radius: 0.5rem !important;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 97, 153, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 2rem;
        margin: 1rem;
        max-width: none;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-circle i {
        font-size: 1.75rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .header-main {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .header-icon {
        width: 50px;
        height: 50px;
    }
    
    .header-icon i {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .connection-status {
        align-self: center;
        margin-top: 1rem;
    }
    
    .sidebar {
        position: relative;
    }
    
    .sidebar-header {
        padding: 1.5rem;
    }
    
    .brand-container {
        justify-content: center;
    }
    
    .brand-icon {
        width: 35px;
        height: 35px;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .service-icon {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 1.5rem;
        border-radius: 1rem;
        margin: 0.5rem;
    }
    
    .logo-circle {
        width: 60px;
        height: 60px;
    }
    
    .logo-circle i {
        font-size: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .form-floating > label {
        font-size: 0.9rem;
    }
    
    .login-btn {
        font-size: 1rem;
        padding: 0.875rem;
    }
    
    .default-credentials {
        padding: 0.75rem;
        margin-top: 1rem;
    }
    
    .credential {
        font-size: 0.85rem;
    }
    
    .footer {
        position: static;
    }
    
    .login-body {
        padding-bottom: 2rem;
    }
}

/* Loading and Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

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

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 30px rgba(61, 97, 153, 0.4); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 40px rgba(61, 97, 153, 0.6); 
    }
}

@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

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

@keyframes pulse-line {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.1); 
    }
}

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

.spin {
    animation: spin 1s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Additional text color fixes */
.input-group-text {
    background-color: var(--dark-card) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--text-light) !important;
}

.btn-outline-secondary {
    color: var(--text-muted) !important;
    border-color: var(--dark-border) !important;
}

.btn-outline-secondary:hover {
    color: var(--text-light) !important;
    background-color: var(--dark-border) !important;
    border-color: var(--dark-border) !important;
}

.btn-outline-success {
    color: var(--success-color) !important;
    border-color: var(--success-color) !important;
}

.btn-outline-success:hover {
    background-color: var(--success-color) !important;
    color: white !important;
}

.btn-outline-danger {
    color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
}

.btn-outline-danger:hover {
    background-color: var(--danger-color) !important;
    color: white !important;
}

.btn-outline-info {
    color: var(--info-color) !important;
    border-color: var(--info-color) !important;
}

.btn-outline-info:hover {
    background-color: var(--info-color) !important;
    color: var(--dark-bg) !important;
}

/* Bootstrap override for better visibility */
.text-center {
    color: var(--text-light) !important;
}

/* Fix stat-value word breaking */
.stat-value {
    white-space: nowrap !important;
    word-break: keep-all !important;
    display: inline-block !important;
}

/* Fix dropdown and modal colors */
.dropdown-menu {
    background-color: var(--dark-surface) !important;
    border: 1px solid var(--dark-border) !important;
}

.dropdown-item {
    color: var(--text-light) !important;
}

.dropdown-item:hover {
    background-color: var(--dark-card) !important;
    color: var(--text-light) !important;
}

.modal-content {
    background-color: var(--dark-surface) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--text-light) !important;
}

.modal-header {
    border-bottom: 1px solid var(--dark-border) !important;
    color: var(--text-light) !important;
}

.modal-footer {
    border-top: 1px solid var(--dark-border) !important;
}

.modal-title {
    color: var(--text-light) !important;
}

/* Fix close button */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Ensure table text is visible */
.table-dark {
    --bs-table-color: var(--text-light) !important;
    --bs-table-bg: var(--dark-surface) !important;
    --bs-table-border-color: var(--dark-border) !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05) !important;
    --bs-table-striped-color: var(--text-light) !important;
    --bs-table-active-bg: rgba(61, 97, 153, 0.1) !important;
    --bs-table-active-color: var(--text-light) !important;
    --bs-table-hover-bg: rgba(61, 97, 153, 0.1) !important;
    --bs-table-hover-color: var(--text-light) !important;
}

/* Fix pagination colors */
.pagination .page-link {
    background-color: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
    color: var(--text-light) !important;
}

.pagination .page-link:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Fix nav tabs if used */
.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link:hover {
    color: var(--text-light) !important;
    border-color: var(--dark-border) !important;
}

.nav-tabs .nav-link.active {
    color: var(--info-color) !important;
    background-color: var(--dark-surface) !important;
    border-color: var(--dark-border) !important;
}

/* Responsive button sizing for MikroTik form */
#mikrotik-form .d-flex.gap-2 {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
}

#mikrotik-form .d-flex.gap-2 .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: auto;
}

#mikrotik-form .d-flex.gap-2 .btn i {
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

/* Reduce icon margin further on smaller screens */
@media (max-width: 1024px) {
    #mikrotik-form .d-flex.gap-2 .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    #mikrotik-form .d-flex.gap-2 .btn i {
        font-size: 0.75rem;
        margin-right: 0.2rem;
    }
}

/* Stack buttons on very small screens only */
@media (max-width: 480px) {
    #mikrotik-form .d-flex.gap-2 {
        flex-direction: column;
        flex-wrap: wrap !important;
    }

    #mikrotik-form .d-flex.gap-2 .btn {
        width: 100%;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   BERKAHMON - Logo
   ========================================================================== */
.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    letter-spacing: 0.5px;
}

.brand-text .brand-accent {
    color: var(--brand-red);
}

.login-logo-box {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin: 0 auto;
    max-width: 320px;
    box-shadow: 0 0 30px rgba(237, 50, 55, 0.18), 0 8px 24px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--brand-red);
}

.login-logo-box img {
    display: block;
    width: 100%;
    height: auto;
}

.login-title .brand-accent {
    color: var(--brand-red);
    -webkit-text-fill-color: var(--brand-red);
}

.login-bg {
    background: linear-gradient(135deg, var(--brand-navy) 0%, #1F3357 55%, var(--brand-red-dark) 140%) !important;
}

.hero-title {
    letter-spacing: 1px;
}

.btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

a { color: var(--info-color); }
a:hover { color: #A9C2EA; }

/* ==========================================================================
   Sidebar sub-menu (Configuration > VPN Remote)
   ========================================================================== */
.nav-group-toggle {
    cursor: pointer;
}

.nav-group-toggle .nav-caret {
    margin-left: auto;
    font-size: 0.8rem !important;
    transition: transform 0.25s ease;
}

.nav-group-toggle.collapsed .nav-caret {
    transform: rotate(-90deg);
}

.nav-group-toggle.parent-active {
    color: var(--text-light);
    border-left-color: var(--brand-navy);
}

.nav-submenu {
    padding-left: 0;
    margin: 0.25rem 0 0.25rem 0;
    background: rgba(0, 0, 0, 0.15);
}

.nav-submenu .nav-item {
    margin-bottom: 0;
}

.nav-submenu .nav-link {
    padding: 0.7rem 1.5rem 0.7rem 3rem;
    font-size: 0.92rem;
}

.nav-submenu .nav-link i {
    font-size: 0.95rem;
}

/* ==========================================================================
   BERKAHMON - Tampilan Mobile (HP)
   ========================================================================== */
.mobile-topbar,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

@media (max-width: 767.98px) {
    /* ---- Bar atas ---- */
    body {
        padding-top: 58px;
    }

    body.login-body {
        padding-top: 0;
    }

    .mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 58px;
        z-index: 1040;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0 0.6rem;
        background: var(--dark-surface);
        border-bottom: 2px solid var(--brand-red);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    }

    .mobile-menu-btn,
    .mobile-logout,
    .sidebar-close {
        width: 44px;
        height: 44px;
        border: 1px solid var(--dark-border);
        border-radius: 0.6rem;
        background: var(--dark-card);
        color: var(--text-light);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        text-decoration: none;
        flex-shrink: 0;
    }

    .mobile-logout {
        color: var(--danger-color);
        font-size: 1.2rem;
    }

    .mobile-menu-btn:active,
    .mobile-logout:active,
    .sidebar-close:active {
        background: var(--primary-dark);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-light);
        text-decoration: none;
        font-weight: 700;
        font-size: 1.1rem;
        letter-spacing: 0.5px;
        min-width: 0;
    }

    .mobile-brand img {
        width: 34px;
        height: 34px;
        background: #fff;
        border-radius: 0.45rem;
        padding: 2px;
        object-fit: contain;
    }

    .mobile-brand .brand-accent {
        color: var(--brand-red);
    }

    /* ---- Menu laci (drawer) ---- */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px !important;
        max-width: 85vw;
        min-height: 0;
        z-index: 1050;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1045;
        background: rgba(0, 0, 0, 0.55);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 1rem !important;
    }

    .sidebar-header .brand-container {
        justify-content: flex-start;
    }

    .sidebar-close {
        display: inline-flex;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .sidebar-nav {
        display: block !important;
        padding: 0.5rem 0 1.5rem;
    }

    .sidebar .nav-link {
        padding: 0.85rem 1.25rem;
    }

    .sidebar .nav-submenu .nav-link {
        padding: 0.75rem 1.25rem 0.75rem 2.75rem;
    }

    .nav-link:hover {
        transform: none;
    }

    /* ---- Konten utama ---- */
    .main-content {
        width: 100%;
        padding: 0.75rem !important;
        min-height: calc(100vh - 58px);
    }

    .page-header {
        padding: 1rem !important;
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }

    .header-main {
        flex-direction: row !important;
        align-items: center;
        text-align: left !important;
        gap: 0.75rem !important;
    }

    .header-icon {
        width: 42px !important;
        height: 42px !important;
        flex-shrink: 0;
    }

    .header-icon i {
        font-size: 1.25rem !important;
    }

    .page-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.15rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .header-actions {
        align-self: stretch;
        width: 100%;
    }

    .card {
        border-radius: 0.75rem;
    }

    .card-header {
        padding: 0.85rem !important;
    }

    .card-header.d-flex {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .card-body {
        padding: 0.85rem;
    }

    .row {
        --bs-gutter-x: 0.75rem;
    }

    /* Kartu statistik: 3 kolom kecil sejajar */
    .stat-value {
        font-size: 1.5rem !important;
    }

    .stat-label {
        font-size: 0.75rem !important;
    }

    /* Filter pencarian & aksi massal */
    .search-filters {
        padding: 0.85rem !important;
    }

    .bulk-actions .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.6rem;
    }

    .bulk-actions .d-flex > div:last-child {
        display: flex;
        gap: 0.5rem;
    }

    .bulk-actions .btn {
        flex: 1;
        margin: 0 !important;
    }

    /* Tab bisa digeser */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
    }

    /* ---- Ramah sentuhan ---- */
    .form-control,
    .form-select {
        font-size: 16px !important; /* cegah zoom otomatis di iPhone */
    }

    .btn {
        min-height: 42px;
    }

    .btn-sm,
    .btn-action {
        min-height: 38px;
        min-width: 38px;
    }

    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    /* ---- Tabel jadi kartu ---- */
    .table-responsive {
        overflow: visible;
        font-size: 0.9rem !important;
    }

    .table-cards thead {
        display: none;
    }

    .table-cards,
    .table-cards tbody {
        display: block;
        width: 100%;
    }

    .table-cards tbody tr {
        display: block;
        margin: 0.65rem;
        padding: 0.35rem 0.85rem;
        background: var(--dark-card);
        border: 1px solid var(--dark-border);
        border-left: 3px solid var(--primary-color);
        border-radius: 0.75rem;
    }

    .table-cards tbody tr[style*="table-row"] {
        display: block !important;
    }

    .table-cards > :not(caption) > * > * {
        background-color: transparent !important;
        box-shadow: none !important;
    }

    .table-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 0 !important;
        border: 0 !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08) !important;
        text-align: right !important;
        white-space: normal;
        word-break: break-word;
        width: auto !important;
    }

    .table-cards tbody td:last-child {
        border-bottom: 0 !important;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.4rem;
    }

    .table-cards tbody td[data-label]::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 600;
        text-align: left;
        flex-shrink: 0;
        margin-right: auto;
    }

    .table-cards tbody td[data-label=""]::before {
        display: none;
    }

    .table-cards tbody td[colspan] {
        display: block;
        text-align: center !important;
        border-bottom: 0 !important;
    }

    .table-cards .btn-action {
        margin: 0 !important;
    }

    .table-cards .traffic-value {
        min-width: 0;
    }

    /* ---- Login ---- */
    .login-body .vh-100 {
        height: auto !important;
        min-height: 100vh;
    }

    .login-body .row.h-100 {
        min-height: 100vh;
        height: auto !important;
    }

    .login-logo-box {
        max-width: 260px;
        padding: 0.75rem 1rem;
    }

    .footer {
        position: static !important;
        padding: 1rem 0;
    }
}

@media (max-width: 575.98px) {
    /* Form / modal tampil layar penuh */
    .modal-dialog {
        margin: 0;
        max-width: none;
        min-height: 100%;
    }

    .modal-content {
        min-height: 100vh;
        border-radius: 0;
        border: 0;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: inherit;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: inherit;
        flex-wrap: nowrap;
    }

    .modal-footer .btn {
        flex: 1;
    }

    .login-container {
        padding: 1.5rem 1.25rem !important;
    }
}

/* ---- Perbaikan umum (desktop & mobile) ---- */
.brand-icon {
    flex-shrink: 0;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(237, 50, 55, 0.25), rgba(61, 97, 153, 0.12)) !important;
    border-left-color: var(--accent-color) !important;
}

@media (max-width: 767.98px) {
    /* Kartu statistik sejajar: PPP 3 kolom, Monitoring 2x2 */
    .row:has(> .col-lg-4 > .card > .card-body > .stat-card) > .col-lg-4 {
        flex: 0 0 auto;
        width: 33.3333%;
        margin-bottom: 0.5rem !important;
    }

    .row:has(> .col-lg-3 > .card > .card-body > .stat-card) > .col-lg-3 {
        flex: 0 0 auto;
        width: 50%;
        margin-bottom: 0.5rem !important;
    }

    .row:has(> [class*="col-lg-"] > .card > .card-body > .stat-card) {
        --bs-gutter-x: 0.5rem;
        margin-bottom: 0.75rem !important;
    }

    .row:has(> [class*="col-lg-"] > .card > .card-body > .stat-card) .card-body {
        padding: 0.75rem 0.4rem !important;
    }

    .row:has(> [class*="col-lg-"] > .card > .card-body > .stat-card) .stat-card {
        padding: 0 !important;
    }
}

/* Sidebar sempit (laptop/tablet): nama tidak terpotong */
@media (min-width: 768px) and (max-width: 1399.98px) {
    .brand-container {
        gap: 0.6rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .brand-text {
        font-size: 1.02rem;
    }
}

/* ==========================================================================
   BERKAHMON - NOC
   ========================================================================== */
:root {
    --noc-up: #22C55E;
    --noc-down: #EF4444;
    --noc-rx: #4FD1C5;
    --noc-tx: #F6AD55;
}

/* ---- Toolbar & ringkasan ---- */
.noc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.noc-summary {
    display: flex;
    gap: 0.6rem;
}

.noc-sum {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    min-width: 96px;
}

.noc-sum span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.noc-sum b {
    font-size: 1.4rem;
    line-height: 1.2;
}

.noc-sum.up b { color: var(--noc-up); }
.noc-sum.down b { color: var(--noc-down); }

.noc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.noc-controls .form-control,
.noc-controls .form-select {
    width: auto;
    min-width: 120px;
}

.noc-live {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.noc-live small {
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-muted);
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-red);
    box-shadow: 0 0 0 0 rgba(237, 50, 55, 0.6);
    animation: noc-pulse 1.6s infinite;
}

.live-dot.paused {
    background: var(--secondary-color);
    animation: none;
}

@keyframes noc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(237, 50, 55, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(237, 50, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(237, 50, 55, 0); }
}

/* ---- Kartu perangkat ---- */
.noc-card {
    background: linear-gradient(160deg, var(--dark-surface) 0%, #182A48 100%);
    border: 1px solid var(--dark-border);
    border-top: 3px solid var(--dark-border);
    border-radius: 1rem;
    padding: 1.1rem 1.2rem 1.2rem;
    height: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.noc-card.is-up { border-top-color: var(--noc-up); }
.noc-card.is-down {
    border-top-color: var(--noc-down);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25), 0 8px 24px rgba(239, 68, 68, 0.08);
}
.noc-card.is-disabled { opacity: 0.6; }

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

.noc-title { min-width: 0; }

.noc-title h5 {
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    text-transform: uppercase;
    word-break: break-word;
}

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

.noc-badge {
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 0.5rem;
    background: var(--dark-card);
    color: var(--text-muted);
}

.noc-badge.up { background: var(--noc-up); color: #fff; }
.noc-badge.down { background: var(--noc-down); color: #fff; animation: noc-blink 1.2s infinite; }
.noc-badge.off { background: var(--secondary-color); color: #fff; }

@keyframes noc-blink {
    50% { opacity: 0.55; }
}

.noc-checks {
    display: flex;
    gap: 3px;
    margin-top: 0.25rem;
}

.noc-checks span {
    flex: 1;
    max-width: 10px;
    height: 18px;
    border-radius: 3px;
    background: var(--dark-border);
}

.noc-checks span.up { background: var(--noc-up); }
.noc-checks span.down { background: var(--noc-down); }

.noc-checks-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0.3rem 0 0.75rem;
}

.noc-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    padding: 0.2rem 0;
}

.noc-row span { color: var(--text-muted); }
.noc-row b { font-weight: 600; text-align: right; }

.noc-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #FCA5A5;
    border-radius: 0.6rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    word-break: break-word;
}

/* ---- Interface ---- */
.noc-ifaces {
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.noc-iface {
    background: rgba(5, 12, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--noc-up);
    border-radius: 0.6rem;
    padding: 0.55rem 0.75rem;
}

.noc-iface.down,
.noc-iface.missing { border-left-color: var(--noc-down); }
.noc-iface.disabled { border-left-color: var(--secondary-color); }

.noc-iface-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.noc-iface-name {
    font-weight: 700;
    color: var(--noc-up);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.noc-iface.down .noc-iface-name,
.noc-iface.missing .noc-iface-name { color: var(--noc-down); }
.noc-iface.disabled .noc-iface-name { color: var(--text-muted); }

.noc-iface-head small {
    color: #FCA5A5;
    font-size: 0.72rem;
}

.noc-iface-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.noc-rates {
    font-size: 0.85rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.noc-rates .lbl {
    display: inline-block;
    min-width: 38px;
    font-size: 0.72rem;
    font-weight: 700;
}

.noc-rates .lbl.rx { color: var(--noc-rx); }
.noc-rates .lbl.tx { color: var(--noc-tx); }

.noc-spark {
    flex: 1;
    min-width: 70px;
    max-width: 180px;
    height: 34px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.03) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.noc-spark polyline {
    fill: none;
    stroke-width: 1.6;
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
}

.noc-spark .sp-rx { stroke: var(--noc-rx); }
.noc-spark .sp-tx { stroke: var(--noc-tx); }

.noc-iface-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px dashed var(--dark-border);
    border-radius: 0.6rem;
    padding: 0.6rem;
    margin: 0.75rem 0;
    text-align: center;
}

.noc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: inline-block;
    flex-shrink: 0;
}

.noc-dot.on { background: var(--noc-up); box-shadow: 0 0 6px var(--noc-up); }
.noc-dot.off { background: var(--noc-down); }

/* ---- CPU / RAM / statistik ---- */
.noc-meter { margin-top: 0.35rem; }

.noc-bar {
    height: 6px;
    background: var(--dark-card);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.noc-bar i {
    display: block;
    height: 100%;
    background: var(--noc-up);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.noc-bar.lvl-mid i { background: #F59E0B; }
.noc-bar.lvl-high i { background: var(--noc-down); }

.noc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.noc-stats > div {
    background: var(--dark-card);
    border-radius: 0.6rem;
    padding: 0.5rem;
    text-align: center;
}

.noc-stats span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.noc-stats b { font-size: 1.1rem; }

.noc-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--dark-surface);
    border: 1px dashed var(--dark-border);
    border-radius: 1rem;
}

.noc-empty > i {
    font-size: 3rem;
    color: var(--info-color);
    display: block;
    margin-bottom: 0.5rem;
}

/* ---- Configuration › NOC ---- */
.noc-chip {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.4rem;
    background: rgba(61, 97, 153, 0.35);
    border: 1px solid var(--dark-border);
    margin: 0.1rem 0;
}

.noc-if-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid var(--dark-border);
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.15);
}

.noc-if-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 0.5rem;
    background: var(--dark-card);
    border: 1px solid transparent;
    cursor: pointer;
    margin: 0;
}

.noc-if-option:has(input:checked) {
    border-color: var(--brand-red);
    background: rgba(237, 50, 55, 0.12);
}

.noc-if-option .form-check-input { margin: 0; flex-shrink: 0; }
.noc-if-name { font-weight: 600; }
.noc-if-type {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.noc-help code {
    color: #FCA5A5;
    word-break: break-all;
}

@media (max-width: 767.98px) {
    .noc-toolbar { flex-direction: column; align-items: stretch; }
    .noc-summary { display: grid; grid-template-columns: repeat(3, 1fr); }
    .noc-sum { min-width: 0; padding: 0.5rem 0.6rem; text-align: center; }
    .noc-controls { display: grid; grid-template-columns: 1fr 1fr; }
    .noc-controls .noc-live,
    .noc-controls #nocSearch,
    .noc-controls #pingSearch { grid-column: 1 / -1; }
    .noc-controls .form-control,
    .noc-controls .form-select { width: 100%; min-width: 0; }
    .noc-card { padding: 1rem; }
    .noc-if-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   BERKAHMON - PING
   ========================================================================== */
:root {
    --ping-good: #22C55E;
    --ping-warn: #F59E0B;
    --ping-bad: #F97316;
    --ping-rto: #EF4444;
}

.noc-sum.warn b { color: var(--ping-warn); }
.noc-badge.warn { background: var(--ping-warn); color: #1a1a1a; }

.ping-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
}

.ping-legend .lg {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 0.35rem;
    vertical-align: -1px;
}

.lg.good { background: var(--ping-good); }
.lg.warn { background: var(--ping-warn); }
.lg.bad { background: var(--ping-bad); }
.lg.rto { background: var(--ping-rto); }

.ping-list {
    display: grid;
    gap: 0.55rem;
}

.ping-row {
    background: rgba(5, 12, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--dark-border);
    border-radius: 0.7rem;
    padding: 0.65rem 0.8rem;
    --lv: var(--text-muted);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.ping-row.lvl-good { --lv: var(--ping-good); }
.ping-row.lvl-warn { --lv: var(--ping-warn); }
.ping-row.lvl-bad { --lv: var(--ping-bad); }
.ping-row.lvl-rto,
.ping-row.lvl-err { --lv: var(--ping-rto); background: rgba(239, 68, 68, 0.08); }
.ping-row { border-left-color: var(--lv); }

.ping-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.ping-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.ping-name b {
    display: block;
    font-size: 0.95rem;
    word-break: break-word;
}

.ping-name small {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

.ping-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lv);
    box-shadow: 0 0 8px var(--lv);
    flex-shrink: 0;
}

.ping-row.lvl-rto .ping-dot,
.ping-row.lvl-err .ping-dot { animation: noc-blink 1s infinite; }

.ping-latency {
    text-align: right;
    flex-shrink: 0;
}

.ping-ms {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--lv);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.ping-loss {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.ping-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.ping-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.ping-graph {
    flex: 1;
    max-width: 220px;
    min-width: 90px;
}

.ping-spark {
    width: 100%;
    height: 34px;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ping-spark .sp-line {
    fill: none;
    stroke: var(--lv);
    stroke-width: 1.8;
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
}

.ping-spark .sp-warn {
    stroke: rgba(245, 158, 11, 0.35);
    stroke-dasharray: 3 3;
    vector-effect: non-scaling-stroke;
}

.ping-spark .sp-rto {
    stroke: rgba(239, 68, 68, 0.75);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.ping-checks-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
}

.ping-checks {
    flex: 1;
    margin: 0;
}

.ping-checks span { height: 10px; max-width: none; }

.ping-uptime {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ping-dev-error:empty { display: none; }

/* Configuration › PING */
.ping-device-card .card-header h6 { font-weight: 700; }

.ping-empty-row {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 767.98px) {
    .ping-summary { grid-template-columns: repeat(4, 1fr) !important; }
    .ping-summary .noc-sum { padding: 0.45rem 0.3rem; }
    .ping-summary .noc-sum span { font-size: 0.65rem; }
    .ping-ms { font-size: 1.15rem; }
    .ping-detail { flex-direction: column; align-items: stretch; }
    .ping-graph { max-width: none; }
    .ping-device-card .card-header { flex-wrap: wrap; gap: 0.5rem; }
}

/* ==========================================================================
   BERKAHMON - ACS (GenieACS)
   ========================================================================== */
.acs-summary {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
}

.acs-summary .noc-sum {
    text-align: left;
    color: var(--text-light);
    min-width: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.acs-summary div.noc-sum { cursor: default; }
.acs-summary button.noc-sum:hover { border-color: var(--brand-red); transform: translateY(-1px); }

.acs-filters {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(120px, 1fr)) auto;
    gap: 0.5rem;
}

.acs-table td { vertical-align: middle; }
.acs-table tr.onu-offline td { opacity: 0.75; }

.onu-name {
    font-weight: 700;
    word-break: break-word;
}

.onu-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.onu-status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
}

.onu-status.on { background: rgba(34, 197, 94, 0.18); color: #4ADE80; border: 1px solid rgba(34, 197, 94, 0.4); }
.onu-status.off { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.4); }

.onu-rx {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
}

.onu-rx.rx-good { color: #4ADE80; background: rgba(34, 197, 94, 0.12); }
.onu-rx.rx-warn { color: #FBBF24; background: rgba(245, 158, 11, 0.15); }
.onu-rx.rx-bad { color: #FCA5A5; background: rgba(239, 68, 68, 0.18); }
.onu-rx.rx-none { color: var(--text-muted); }

.onu-ssid {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onu-wifi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark-card);
    border-radius: 0.5rem;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.4rem;
}

#acsPager:empty { display: none !important; }
#acsPager { gap: 0.25rem; align-items: center; background: transparent; border-top: 1px solid var(--dark-border); }

@media (max-width: 1199.98px) {
    .acs-summary { grid-template-columns: repeat(3, 1fr); }
    .acs-filters { grid-template-columns: 1fr 1fr 1fr; }
    .acs-filters #acsSearch { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .acs-summary { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    .acs-summary .noc-sum { padding: 0.45rem 0.5rem; text-align: center; }
    .acs-summary .noc-sum span { font-size: 0.62rem; }
    .acs-summary .noc-sum b { font-size: 1.15rem; }
    .acs-filters { grid-template-columns: 1fr 1fr; }
    .acs-filters #acsSearch { grid-column: 1 / -1; }
    .onu-ssid { max-width: 180px; }
    .table-cards .onu-cell { align-items: flex-end; text-align: right; }
    .acs-table tr.onu-offline { border-left-color: var(--noc-down) !important; }
}

/* ACS multi-server */
.acs-servers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.acs-servers:empty { display: none; }

.acs-srv {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 2rem;
    padding: 0.35rem 0.9rem;
    color: var(--text-light);
    font-size: 0.82rem;
    cursor: pointer;
}

.acs-srv small { color: var(--text-muted); }
.acs-srv .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary-color); }
.acs-srv.ok .dot { background: var(--noc-up); box-shadow: 0 0 6px var(--noc-up); }
.acs-srv.err { border-color: rgba(239, 68, 68, 0.5); }
.acs-srv.err .dot { background: var(--noc-down); animation: noc-blink 1s infinite; }
.acs-srv.active { border-color: var(--brand-red); background: rgba(237, 50, 55, 0.12); }

.acs-srv-badge {
    display: inline-block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    padding: 0.05rem 0.45rem;
    border-radius: 0.35rem;
    background: rgba(61, 97, 153, 0.35);
    color: var(--info-color);
}

.acs-filters { grid-template-columns: minmax(200px, 2fr) repeat(5, minmax(110px, 1fr)) auto; }
.acs-filters:not(:has(.acs-server-wrap:not(.d-none))) { grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(120px, 1fr)) auto; }
.acs-server-wrap .form-select { width: 100%; }

@media (max-width: 1199.98px) {
    .acs-filters,
    .acs-filters:not(:has(.acs-server-wrap:not(.d-none))) { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 767.98px) {
    .acs-filters,
    .acs-filters:not(:has(.acs-server-wrap:not(.d-none))) { grid-template-columns: 1fr 1fr; }
    .acs-filters .acs-server-wrap { grid-column: 1 / -1; }
    .acs-srv { flex: 1 1 100%; justify-content: flex-start; }
}

/* ==========================================================================
   BERKAHMON - Layar laptop kecil (768px – 1599px)
   ========================================================================== */
.onu-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.acs-actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.acs-actions .btn-action { margin: 0 !important; }

@media (min-width: 768px) and (max-width: 1599.98px) {
    html { font-size: 14px; }

    .main-content { padding: 1.25rem !important; }

    .page-header {
        padding: 1.1rem 1.4rem !important;
        margin-bottom: 1.1rem !important;
    }

    .header-icon {
        width: 50px !important;
        height: 50px !important;
    }

    .header-icon i { font-size: 1.4rem !important; }
    .page-title { font-size: 1.55rem !important; margin-bottom: 0.1rem; }

    .sidebar .nav-link { padding: 0.7rem 1.1rem; }
    .sidebar .nav-submenu .nav-link { padding: 0.6rem 1.1rem 0.6rem 2.5rem; }
    .sidebar-header { padding: 1.1rem 1rem !important; }

    .card-header { padding: 0.8rem 1rem; }
    .card-body { padding: 1rem; }

    .noc-sum { padding: 0.45rem 0.8rem; }
    .noc-sum b { font-size: 1.25rem; }

    /* ---- ACS ---- */
    .acs-filters {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .acs-filters > * { flex: 1 1 130px; min-width: 0; }
    .acs-filters #acsSearch { flex: 1 1 100%; }
    .acs-filters #acsRefresh { flex: 0 0 auto; }
    .acs-filters .acs-server-wrap.d-none { display: none !important; }

    .acs-table { font-size: 0.88rem; }
    .acs-table > :not(caption) > * > * { padding: 0.5rem 0.55rem; }
    .acs-table th { white-space: nowrap; }
    .onu-ssid { max-width: 150px; }

    .acs-actions {
        display: grid;
        grid-template-columns: repeat(3, 30px);
        gap: 0.25rem;
    }

    .acs-actions .btn-action {
        width: 30px;
        height: 30px;
        min-width: 0;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
    }
}

@media (min-width: 1280px) and (max-width: 1599.98px) {
    .acs-actions { grid-template-columns: repeat(5, 30px); }
}

@media (min-width: 768px) and (max-width: 1279.98px) {
    html { font-size: 13px; }
    .acs-summary { grid-template-columns: repeat(3, 1fr); }
}

/* ACS: tabel jadi kartu 2 kolom di layar sempit (tablet / laptop kecil dengan zoom besar) */
@media (min-width: 768px) and (max-width: 1099.98px) {
    .acs-table thead { display: none; }

    .acs-table,
    .acs-table tbody { display: block; width: 100%; }

    .acs-table tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        padding: 0.6rem;
    }

    .acs-table tbody tr {
        display: block;
        padding: 0.4rem 0.8rem;
        background: var(--dark-card);
        border: 1px solid var(--dark-border);
        border-left: 3px solid var(--primary-color);
        border-radius: 0.75rem;
    }

    .acs-table tbody tr.onu-offline { border-left-color: var(--noc-down); }
    .acs-table tr.onu-offline td { opacity: 1; }
    .acs-table > :not(caption) > * > * { background-color: transparent !important; box-shadow: none !important; }

    .acs-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.4rem 0 !important;
        border: 0 !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08) !important;
        text-align: right;
    }

    .acs-table tbody td:last-child { border-bottom: 0 !important; }

    .acs-table tbody td[data-label]::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 600;
        text-align: left;
        flex-shrink: 0;
        margin-right: auto;
    }

    .acs-table tbody td:first-child::before { display: none; }
    .acs-table tbody td:first-child { justify-content: flex-start; text-align: left; }
    .acs-table tbody td:first-child .onu-cell { align-items: flex-start; }
    .acs-table .onu-cell { align-items: flex-end; }
    .acs-table tbody td[colspan] { grid-column: 1 / -1; display: block; text-align: center; }
    .acs-table tbody tr:has(td[colspan]) { grid-column: 1 / -1; }

    .acs-actions { grid-template-columns: repeat(5, 32px); }
    .acs-actions .btn-action { width: 32px; height: 32px; }
}

/* HP: tombol aksi ACS tetap satu baris di kartu */
@media (max-width: 767.98px) {
    .table-cards .acs-actions { display: flex; gap: 0.4rem; }
    .acs-table.table-cards tbody td:first-child .onu-cell { align-items: flex-start; text-align: left; }
    .acs-table.table-cards tbody td:first-child::before { display: none; }
}

/* ACS - kelola WAN */
.wan-list { display: grid; gap: 0.45rem; }

.wan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-left: 3px solid var(--info-color);
    border-radius: 0.6rem;
    padding: 0.55rem 0.75rem;
}

.wan-item.mgmt { border-left-color: var(--warning-color); }
.wan-main { min-width: 0; }
.wan-main small { word-break: break-word; }

.wan-bind {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.4rem;
}

.wan-steps { font-size: 0.82rem; line-height: 1.7; }

/* 6 tombol aksi ACS */
@media (min-width: 768px) and (max-width: 1279.98px) {
    .acs-actions { grid-template-columns: repeat(3, 30px); }
}
@media (min-width: 1280px) and (max-width: 1599.98px) {
    .acs-actions { grid-template-columns: repeat(3, 30px); }
}
@media (min-width: 768px) and (max-width: 1099.98px) {
    .acs-actions { grid-template-columns: repeat(6, 32px); }
}

/* ACS - Kelola WiFi */
.wifi-list { display: grid; gap: 0.45rem; }

.wifi-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-left: 3px solid var(--noc-up);
    border-radius: 0.6rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.wifi-item.off { border-left-color: var(--secondary-color); }
.wifi-item.off .wifi-info b { color: var(--text-muted); }
.wifi-item.selected { border-color: var(--brand-red); background: rgba(237, 50, 55, 0.1); }
.wifi-item.busy { opacity: 0.55; pointer-events: none; }
.wifi-item .form-switch .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }
.wifi-item .form-switch .form-check-input:checked { background-color: var(--noc-up); border-color: var(--noc-up); }

.wifi-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wifi-info b { word-break: break-word; }

.wifi-edit {
    background: rgba(5, 12, 24, 0.45);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 0.9rem;
}
#wifiResult, #pppResult, #wanResult, #srvResult, #testResult, #probeResult, .noc-error { word-break: break-word; overflow-wrap: anywhere; }

/* ==========================================================================
   BERKAHMON - PPP Users › NMS
   ========================================================================== */
.ppp-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, 1.4fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.ppp-tabs { border-bottom-color: var(--dark-border); }
.ppp-tabs .nav-link { color: var(--text-muted); border: 0; border-bottom: 2px solid transparent; }
.ppp-tabs .nav-link:hover { color: var(--text-light); border-bottom-color: var(--dark-border); }
.ppp-tabs .nav-link.active { color: var(--text-light) !important; background: transparent !important; border-bottom-color: var(--brand-red) !important; }
.ppp-tabs .badge { font-size: 0.7rem; }

.ppp-card { border-top-left-radius: 0; border-top-right-radius: 0; }
.ppp-table td { vertical-align: middle; }
.ppp-table tr.ppp-disabled td { opacity: 0.6; }
.ppp-pager:empty { display: none !important; }
.ppp-pager { background: transparent; border-top: 1px solid var(--dark-border); gap: 0.25rem; }

@media (max-width: 991.98px) {
    .ppp-toolbar { grid-template-columns: 1fr auto; }
    .ppp-toolbar .ppp-device { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .ppp-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .ppp-table.table-cards tbody td:first-child::before { display: none; }
    .ppp-table.table-cards tbody td:first-child .onu-cell { align-items: flex-start; text-align: left; }
}
.ppp-tabs .nav-link::before, .nav-tabs .nav-link.active::before { display: none !important; }

/* ==========================================================================
   BERKAHMON - Traffic Apps
   ========================================================================== */
.apps-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.apps-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.apps-controls .form-select { width: auto; min-width: 150px; }
.apps-summary .noc-sum { min-width: 130px; }

/* ---- Diagram alir ---- */
.flow-card .card-body {
    background:
        radial-gradient(circle at 39% 50%, rgba(237, 50, 55, 0.08), transparent 45%),
        linear-gradient(180deg, rgba(5, 12, 24, 0.35), rgba(5, 12, 24, 0.1));
    border-radius: 0 0 0.75rem 0.75rem;
}

.flow-svg { width: 100%; height: auto; max-height: 440px; display: block; }

.flow-link {
    fill: none;
    stroke: var(--dark-border);
    stroke-width: 2;
    stroke-linecap: round;
    transition: stroke-width 0.8s ease, stroke 0.8s ease;
}

.node-bg { fill: var(--dark-card); stroke: var(--dark-border); stroke-width: 2; }
.node-bg.router { fill: #1F3357; stroke: var(--brand-red); stroke-width: 3; }
.node-label { fill: var(--text-light); font-size: 15px; font-weight: 700; }
.node-sub { fill: var(--text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.flow-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.node-ring {
    fill: none;
    stroke-width: 2.5;
    opacity: 0.35;
    transform-box: fill-box;
    transform-origin: center;
}

.node-ring.active { opacity: 1; animation: app-pulse 1.6s ease-out infinite; }

@keyframes app-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
}

.router-glow { opacity: 0.25; transform-box: fill-box; transform-origin: center; }
.router-glow.active { animation: router-glow 2.4s ease-in-out infinite; }

@keyframes router-glow {
    0%, 100% { opacity: 0.35; transform: scale(0.92); }
    50% { opacity: 0.9; transform: scale(1.08); }
}

.particle { filter: drop-shadow(0 0 3px currentColor); }

.flow-legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.flow-legend .dot { display: inline-block; border-radius: 50%; background: var(--brand-red); margin-right: 0.35rem; vertical-align: middle; }
.flow-legend .dot.big { width: 9px; height: 9px; }
.flow-legend .dot.small { width: 6px; height: 6px; background: #E2E8F0; }

/* ---- Kartu aplikasi ---- */
.app-card {
    position: relative;
    height: 100%;
    background: linear-gradient(160deg, var(--dark-surface), #182A48);
    border: 1px solid var(--dark-border);
    border-top: 3px solid var(--app);
    border-radius: 1rem;
    padding: 1rem;
    overflow: hidden;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.app-card.is-hot { box-shadow: 0 0 0 1px var(--app), 0 10px 30px -12px var(--app); }

.app-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.75rem; }
.app-head b { font-size: 1.05rem; }

.app-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--app);
    background: color-mix(in srgb, var(--app) 18%, transparent);
    flex-shrink: 0;
}

.app-share-val { margin-left: auto; font-weight: 800; font-size: 1.2rem; color: var(--app); font-variant-numeric: tabular-nums; }

.app-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.6rem; }
.app-rates small { display: block; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
.app-rates b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.app-share-bar { height: 6px; background: var(--dark-card); border-radius: 4px; overflow: hidden; margin-bottom: 0.6rem; }
.app-share-bar i { display: block; height: 100%; width: 0; background: var(--app); border-radius: 4px; transition: width 0.8s ease; }

.app-spark svg { width: 100%; height: 42px; display: block; margin-bottom: 0.4rem; }

/* ---- Grafik ---- */
.apps-chart { width: 100%; height: 240px; display: block; }
.apps-chart .grid { stroke: rgba(255, 255, 255, 0.07); }
.apps-chart .axis { fill: var(--text-muted); font-size: 11px; }
.chart-legend { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 0.35rem; vertical-align: middle; }

/* ---- Atur router ---- */
.setup-list { display: grid; gap: 0.5rem; }

.setup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
}

.setup-actions { display: flex; gap: 0.4rem; }

@media (max-width: 767.98px) {
    .apps-toolbar { flex-direction: column; align-items: stretch; }
    .apps-summary { display: grid; grid-template-columns: repeat(3, 1fr); }
    .apps-summary .noc-sum { min-width: 0; text-align: center; }
    .apps-summary .noc-sum b { font-size: 0.95rem; }
    .apps-controls { display: grid; grid-template-columns: 1fr 1fr; }
    .apps-controls .noc-live { grid-column: 1 / -1; }
    .apps-controls .form-select { width: 100%; min-width: 0; }
    .apps-chart { height: 180px; }
    .setup-actions { width: 100%; }
    .setup-actions .btn { flex: 1; }
}
@media (max-width: 767.98px) {
    .flow-card .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .flow-svg { min-width: 660px; max-height: none; }
    .flow-card .card-body::after { content: 'geser ke samping →'; display: block; text-align: right; font-size: 0.7rem; color: var(--text-muted); padding: 0 0.4rem 0.2rem; position: sticky; left: 0; }
}

/* ===================== Trafik Pelanggan ===================== */
.traffic-flow { max-height: none; }
.node-label.small { font-size: 13.5px; }
.section-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.cust-title { min-width: 0; }
.cust-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-title small { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-card.is-down { opacity: 0.6; border-top-color: var(--bs-danger, #dc3545); }
.traffic-summary { flex-wrap: wrap; }
.live-dot.paused { animation: none; background: var(--text-muted); }
#rolesBody code { color: #93C5FD; white-space: nowrap; }
@media (max-width: 767.98px) {
    .traffic-summary { grid-template-columns: repeat(2, 1fr); }
    .flow-svg.traffic-flow { min-width: 760px; }
}

/* ===================== NMS · Ping internet 8.8.8.8 ===================== */
.noc-summary { flex-wrap: wrap; }
.noc-sum.inet b { color: var(--noc-up); }
.noc-sum.inet.warn b { color: #F59E0B; }

.inet-box {
    --lat: #22C55E;
    border: 1px solid color-mix(in srgb, var(--lat) 45%, var(--dark-border));
    background: color-mix(in srgb, var(--lat) 9%, var(--dark-card));
    border-radius: 0.7rem;
    padding: 0.55rem 0.75rem;
    margin: 0.6rem 0;
}
.inet-box.lv-mid { --lat: #3B82F6; }
.inet-box.lv-warn { --lat: #F59E0B; }
.inet-box.lv-bad { --lat: #EF4444; }
.inet-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.inet-state { color: var(--lat); font-weight: 700; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.inet-body { display: flex; align-items: center; gap: 0.75rem; }
.inet-val { font-size: 1.6rem; line-height: 1.25; color: var(--lat); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 86px; }
.inet-val small { font-size: 0.85rem; font-weight: 600; }
.inet-spark { flex: 1; height: 30px; min-width: 0; }
.inet-spark .sp-lat { fill: none; stroke: var(--lat); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.inet-spark .sp-drop { stroke: #EF4444; stroke-width: 2; opacity: 0.55; vector-effect: non-scaling-stroke; }
.inet-detail { font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
#sumLat, #sumInet { white-space: nowrap; }
@media (max-width: 767.98px) {
    .noc-summary .noc-sum.inet, .noc-summary .noc-sum.inet + .noc-sum { grid-column: span 1; }
    #sumLat { font-size: 1.1rem; }
}
.flow-click { cursor: pointer; }
.flow-click:hover .node-bg, .flow-click:hover circle:nth-of-type(2) { stroke: #FFFFFF; stroke-width: 2.5; }
.cust-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.role-swap { padding: 0; font-size: 0.75rem; text-decoration: none; color: var(--text-muted); }
.role-swap:hover { color: var(--app); }

/* ===================== PING · durasi RTO ===================== */
.ping-rto { margin-top: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }
.ping-rto:empty { display: none; }
.ping-rto b { font-variant-numeric: tabular-nums; }
.rto-now { color: #FCA5A5; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); border-radius: 0.5rem; padding: 0.3rem 0.55rem; }
.rto-now b { color: #EF4444; font-size: 0.95rem; }
.rto-now span { color: var(--text-muted); }
.rto-last b { color: #F59E0B; }
.rto-none { color: #22C55E; }
.rto-stat { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.35rem; margin-top: 0.2rem; }
.rto-toggle { padding: 0; font-size: 0.75rem; text-decoration: none; margin-left: auto; }
.rto-log { margin-top: 0.3rem; border-top: 1px dashed var(--dark-border); padding-top: 0.3rem; }
.rto-log div { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.1rem 0; font-variant-numeric: tabular-nums; }
.rto-log small { display: block; margin-top: 0.2rem; font-size: 0.7rem; }
.rto-part { color: #FCD34D; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); border-radius: 0.5rem; padding: 0.3rem 0.55rem; }
.rto-part b { color: #F59E0B; }
.rto-part > span { color: var(--text-muted); }
.rto-log .rto-full { color: #F87171; }
.rto-log .rto-partial { color: #FBBF24; }
.worker-badge { font-size: 0.75rem; border-radius: 999px; padding: 0.2rem 0.6rem; white-space: nowrap; }
.worker-badge:empty { display: none; }
.worker-badge.on { color: #86EFAC; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); }
.worker-badge.off { color: var(--text-muted); background: rgba(148, 163, 184, 0.08); border: 1px solid var(--dark-border); }

/* ===================== Notifikasi WA ===================== */
.rto-wa { margin-top: 0.2rem; color: #86EFAC; font-size: 0.75rem; }
.rto-wa.fail { color: #FCA5A5; }
.wa-info { border-radius: 0.6rem; padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-size: 0.85rem; }
.wa-info.ok { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); color: #86EFAC; }
.wa-info.warn { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); color: #FCD34D; }
.wa-preview pre { white-space: pre-wrap; background: #0B141A; color: #E9EDEF; border-radius: 0.6rem; padding: 0.75rem 0.9rem; font-size: 0.8rem; margin: 0; border-left: 3px solid #25D366; font-family: inherit; }
.wa-dev { border: 1px solid var(--dark-border); border-radius: 0.6rem; padding: 0.75rem; margin-bottom: 0.75rem; }
.wa-dev:last-child { margin-bottom: 0; }
.wa-dev-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; }
.wa-tech-inputs { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(200px, 1.4fr); gap: 0.5rem; flex: 1; max-width: 560px; }
.wa-targets { margin-top: 0.6rem; }
.wa-targets summary { cursor: pointer; font-size: 0.8rem; color: var(--text-muted); }
.wa-target-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem 0 0.4rem 0.9rem; border-left: 2px solid var(--dark-border); margin-top: 0.4rem; }
.wa-target-name { font-size: 0.85rem; }
.wa-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; margin-top: 1rem; padding: 0.75rem 0; background: linear-gradient(to top, var(--dark-bg, #0F172A) 70%, transparent); }
.wa-log td { vertical-align: top; }
@media (max-width: 575.98px) {
    .wa-tech-inputs { grid-template-columns: 1fr; max-width: none; }
}
