/* R-Config MGN — tema ala NiceAdmin (Bootstrap 5) */
:root {
  --rc-primary: #4154f1;
  --rc-primary-dark: #2b3bd1;
  --rc-heading: #012970;
  --rc-text: #444;
  --rc-bg: #f6f9ff;
  --rc-sidebar-w: 300px;
}
body { font-family: "Open Sans", sans-serif; background: var(--rc-bg); color: var(--rc-text); }
a { color: var(--rc-primary); text-decoration: none; }
a:hover { color: #717ff5; }
h1, h2, h3, h4, h5, h6 { font-family: "Nunito", sans-serif; }

/* ---------- login ---------- */
.login-page { background: linear-gradient(135deg, #eef2ff 0%, #f6f9ff 100%); }
.login-page .logo img { max-height: 40px; margin-right: 8px; }
.login-page .logo span { font-size: 26px; font-weight: 700; color: var(--rc-heading); font-family: "Nunito", sans-serif; }

/* ---------- main ---------- */
#main { margin-top: 60px; padding: 20px 30px; transition: all 0.3s; }
@media (max-width: 1199px) { #main { padding: 20px; } }
.pagetitle { margin-bottom: 10px; }
.pagetitle h1 { font-size: 24px; margin-bottom: 0; font-weight: 600; color: var(--rc-heading); }
.breadcrumb { font-size: 14px; font-family: "Nunito", sans-serif; color: #899bbd; font-weight: 600; }
.breadcrumb a { color: #899bbd; }
.breadcrumb .active { color: #51678f; font-weight: 600; }

/* ---------- card ---------- */
.card { margin-bottom: 30px; border: none; border-radius: 5px; box-shadow: 0 0 30px rgba(1, 41, 112, 0.1); }
.card-title { padding: 20px 0 15px; font-size: 18px; font-weight: 500; color: var(--rc-heading); font-family: "Poppins", sans-serif; }
.card-title span { color: #899bbd; font-size: 14px; font-weight: 400; }
.card-body { padding: 0 20px 20px; }
.card-header { background-color: #fff; border-bottom: 1px solid #ebeef4; }

/* ---------- header ---------- */
.header { transition: all 0.5s; z-index: 997; height: 60px; box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1); background: #fff; padding-left: 20px; }
.header .toggle-sidebar-btn { font-size: 32px; padding-left: 10px; cursor: pointer; color: var(--rc-heading); }
.header .search-bar { min-width: 360px; padding: 0 20px; }
@media (max-width: 1199px) { .header .search-bar { position: fixed; top: 50px; left: 0; right: 0; padding: 20px; box-shadow: 0 0 15px rgba(1,41,112,.1); background: #fff; z-index: 9999; transition: .3s; visibility: hidden; opacity: 0; } .header .search-bar-show { top: 60px; visibility: visible; opacity: 1; } }
.header .search-form { width: 100%; }
.header .search-form input { border: 0; font-size: 14px; color: var(--rc-heading); border: 1px solid rgba(1,41,112,.2); padding: 7px 38px 7px 8px; border-radius: 3px; transition: .3s; width: 100%; }
.header .search-form input:focus, .header .search-form input:hover { outline: none; box-shadow: 0 0 10px 0 rgba(1,41,112,.15); border: 1px solid rgba(1,41,112,.3); }
.header .search-form button { border: 0; padding: 0; margin-left: -30px; background: none; }
.header .search-form button i { color: var(--rc-heading); }
.logo { line-height: 1; }
@media (min-width: 1200px) { .logo { width: 280px; } }
.logo img { max-height: 32px; margin-right: 6px; }
.logo span { font-size: 24px; font-weight: 700; color: var(--rc-heading); font-family: "Nunito", sans-serif; }
.header-nav ul { list-style: none; }
.header-nav > ul { margin: 0; padding: 0; }
.header-nav .nav-icon { font-size: 22px; color: var(--rc-heading); margin-right: 25px; position: relative; }
.header-nav .nav-profile { color: var(--rc-heading); }
.header-nav .nav-profile img { max-height: 36px; width: 36px; object-fit: cover; }
.header-nav .nav-profile span { font-size: 14px; font-weight: 600; }
.header-nav .badge-number { position: absolute; inset: -2px -5px auto auto; font-weight: normal; font-size: 11px; padding: 3px 6px; }
.header-nav .profile { min-width: 240px; padding-bottom: 0; top: 8px !important; }
.header-nav .profile .dropdown-header h6 { font-size: 18px; margin-bottom: 0; font-weight: 600; color: var(--rc-heading); }
.header-nav .profile .dropdown-header span { font-size: 14px; }
.header-nav .profile .dropdown-item { font-size: 14px; padding: 10px 15px; transition: .3s; }
.header-nav .profile .dropdown-item i { margin-right: 10px; font-size: 18px; line-height: 0; }
.header-nav .profile .dropdown-item:hover { background-color: #f6f9ff; }
.dropdown-menu { border-radius: 4px; padding: 10px 0; animation-name: dropdown-animate; animation-duration: .2s; animation-fill-mode: both; border: 0; box-shadow: 0 5px 30px 0 rgba(82,63,105,.2); }
@keyframes dropdown-animate { 0% { opacity: 0; } 100% { opacity: 1; } }

/* ---------- sidebar ---------- */
.sidebar { position: fixed; top: 60px; left: 0; bottom: 0; width: var(--rc-sidebar-w); z-index: 996; transition: all .3s; padding: 20px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #aab7cf transparent; box-shadow: 0 0 20px rgba(1,41,112,.1); background: #fff; }
@media (max-width: 1199px) { .sidebar { left: -300px; } }
@media (min-width: 1200px) { #main, #footer { margin-left: var(--rc-sidebar-w); } }
@media (max-width: 1199px) { .toggle-sidebar .sidebar { left: 0; } }
@media (min-width: 1200px) { .toggle-sidebar #main, .toggle-sidebar #footer { margin-left: 0; } .toggle-sidebar .sidebar { left: -300px; } }
.sidebar-nav { padding: 0; margin: 0; list-style: none; }
.sidebar-nav li { padding: 0; margin: 0; list-style: none; }
.sidebar-nav .nav-item { margin-bottom: 5px; }
.sidebar-nav .nav-heading { font-size: 11px; text-transform: uppercase; color: #899bbd; font-weight: 600; margin: 10px 0 5px 15px; }
.sidebar-nav .nav-link { display: flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--rc-primary); transition: .3s; background: #f6f9ff; padding: 10px 15px; border-radius: 4px; }
.sidebar-nav .nav-link i { font-size: 16px; margin-right: 10px; color: var(--rc-primary); }
.sidebar-nav .nav-link.collapsed { color: var(--rc-heading); background: #fff; }
.sidebar-nav .nav-link.collapsed i { color: var(--rc-heading); }
.sidebar-nav .nav-link:hover { color: var(--rc-primary); background: #f6f9ff; }
.sidebar-nav .nav-link:hover i { color: var(--rc-primary); }
.sidebar-nav .nav-link .bi-chevron-down { margin-right: 0; transition: transform .2s ease-in-out; }
.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down { transform: rotate(180deg); }
.sidebar-nav .nav-content { padding: 5px 0 0; margin: 0; list-style: none; }
.sidebar-nav .nav-content a { display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--rc-heading); padding: 10px 0 10px 40px; transition: .3s; }
.sidebar-nav .nav-content a i { font-size: 6px; margin-right: 8px; line-height: 0; border-radius: 50%; }
.sidebar-nav .nav-content a:hover, .sidebar-nav .nav-content a.active { color: var(--rc-primary); }
.sidebar-nav .nav-content a.active i { background-color: var(--rc-primary); }
.sidebar-nav .sub-settings .nav-link { font-size: 13px; padding-left: 35px; color: var(--rc-primary); background: #fff; }
.sidebar-footer { position: sticky; top: 100%; padding-top: 20px; text-align: center; font-size: 11px; }

/* ---------- footer ---------- */
.footer { padding: 20px 0; font-size: 14px; transition: all .3s; border-top: 1px solid #cddfff; }
.footer .copyright { text-align: center; color: var(--rc-heading); }
.back-to-top { position: fixed; visibility: hidden; opacity: 0; right: 15px; bottom: 15px; z-index: 99999; background: var(--rc-primary); width: 40px; height: 40px; border-radius: 4px; transition: all .4s; }
.back-to-top i { font-size: 24px; color: #fff; line-height: 0; }
.back-to-top.active { visibility: visible; opacity: 1; }

/* ---------- dashboard cards ---------- */
.info-card { padding-bottom: 10px; }
.info-card h6 { font-size: 28px; color: var(--rc-heading); font-weight: 700; margin: 0; padding: 0; }
.info-card .card-icon { font-size: 32px; line-height: 0; width: 64px; height: 64px; flex-shrink: 0; flex-grow: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.info-card .card-title { padding-bottom: 6px; }
.card-icon.ic-primary { color: var(--rc-primary); background: #f6f6fe; }
.card-icon.ic-success { color: #2eca6a; background: #e0f8e9; }
.card-icon.ic-warning { color: #ffb800; background: #fff6dd; }
.card-icon.ic-danger { color: #ff4d4d; background: #ffe6e6; }
.card-icon.ic-dark { color: #444; background: #eee; }
.stat-pct { font-size: 11px; }
.olt-timeline { border-left: 2px solid #dfe6f5; margin-left: 10px; padding-left: 20px; position: relative; }
.olt-timeline .dot { position: absolute; left: -9px; top: 22px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; background: #ffb800; box-shadow: 0 0 0 2px #dfe6f5; }
.olt-timeline .dot.online { background: #2eca6a; }
.olt-timeline .dot.offline { background: #ff4d4d; }
.olt-img { width: 64px; height: 64px; object-fit: contain; background: #f6f9ff; border-radius: 6px; padding: 4px; }
.mini-stat { text-align: center; min-width: 54px; }
.mini-stat b { display: block; font-size: 15px; color: var(--rc-heading); }
.mini-stat small { font-size: 10px; color: #899bbd; text-transform: lowercase; }
.fan-bar { height: 4px; background: #2eca6a; border-radius: 2px; }

/* ---------- signal cards ---------- */
.sig-card .pct { font-size: 12px; font-weight: 700; }
.sig-card .ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; }
.sig-good .ring { color: #2eca6a; background: #e0f8e9; } .sig-good .pct { color: #2eca6a; }
.sig-warning .ring { color: #ffb800; background: #fff6dd; } .sig-warning .pct { color: #ffb800; }
.sig-critical .ring { color: #ff4d4d; background: #ffe6e6; } .sig-critical .pct { color: #ff4d4d; }
.sig-other .ring { color: #899bbd; background: #eef2f8; } .sig-other .pct { color: #899bbd; }
.sig-card .bar { height: 3px; border-radius: 3px; margin-top: 4px; }

/* ---------- tables ---------- */
.table thead th { font-size: 12px; text-transform: uppercase; color: #899bbd; font-weight: 600; border-bottom: 1px solid #ebeef4; white-space: nowrap; }
.table td { font-size: 13px; vertical-align: middle; } #onu-table td:nth-child(n+7) { white-space: nowrap; }
.badge-idx { background: #ffe9a8; color: #6b4d00; font-weight: 700; font-family: monospace; }
.btn-setting { font-size: 12px; padding: 3px 10px; }
div.dataTables_wrapper div.dataTables_filter input { border-radius: 4px; }
.table-hover tbody tr:hover { background: #f6f9ff; }

/* ---------- forms (register) ---------- */
.form-section { border-bottom: 1px solid #ebeef4; padding: 18px 0; }
.form-section:last-child { border-bottom: 0; }
.section-label { border-left: 3px solid var(--rc-primary); padding-left: 10px; }
.section-label b { color: var(--rc-heading); font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }
.section-label small { display: block; color: #899bbd; font-size: 11px; }
.form-label.sm { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #51678f; margin-bottom: 3px; }
.btn-group-pill .btn { font-size: 12px; padding: 3px 12px; }
.btn-check:checked + .btn-outline-secondary { background: #51678f; border-color: #51678f; color: #fff; }
.svc-box { border: 1px solid #ebeef4; border-radius: 6px; margin-bottom: 10px; }
.svc-box .svc-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: #f8f9fc; border-radius: 6px 6px 0 0; }
.svc-box .svc-body { padding: 14px; }
.svc-box.off .svc-body { display: none; }
.form-control.is-invalid, .form-select.is-invalid { background-image: none; }
.help-err { font-size: 11px; color: #ff4d4d; }
.loader-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.7); z-index: 20000; display: none; align-items: center; justify-content: center; flex-direction: column; }
.loader-overlay.show { display: flex; }
pre.script { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 6px; font-size: 12px; max-height: 420px; overflow: auto; }

/* ---------- view onu ---------- */
.kv label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #51678f; display: block; margin-bottom: 2px; }
.kv .val { font-size: 14px; color: var(--rc-heading); font-weight: 600; }
.kv .val .edit { font-size: 12px; cursor: pointer; margin-left: 4px; color: var(--rc-primary); }
.hist-list { font-size: 12px; max-height: 230px; overflow: auto; }
.hist-list .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 6px; }
.section-timeline { position: relative; border-left: 2px solid #dfe6f5; margin-left: 26px; padding-left: 30px; }
.section-timeline .sec { position: relative; margin-bottom: 14px; }
.section-timeline .sec .ico { position: absolute; left: -51px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--rc-primary); color: #fff; display: grid; place-items: center; font-size: 16px; }
.section-timeline .sec .ring { position: absolute; left: -41px; top: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #ffb800; background: #fff; }
.sec-title { display: inline-block; font-size: 12px; font-weight: 700; color: var(--rc-primary); background: #eef1ff; padding: 2px 10px; border-radius: 4px; margin-bottom: 8px; }
.form-switch .form-check-input { cursor: pointer; }
.onu-actions .btn { font-size: 12px; margin: 2px; }

/* ---------- graphs ---------- */
.graph-card .card-body { padding: 10px 14px 4px; }
.graph-card .g-title { font-size: 13px; font-weight: 700; color: var(--rc-heading); }
.graph-card .g-sub { font-size: 12px; color: #51678f; }
.graph-card .g-olt { font-size: 10px; background: #eef1ff; color: var(--rc-primary); padding: 1px 6px; border-radius: 3px; }

/* ---------- olt settings ---------- */
.olt-card-box { border: 1px solid #ebeef4; border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.port-box { width: 54px; height: 54px; border: 1px solid #dfe6f5; border-radius: 6px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; margin: 4px; font-size: 10px; color: #51678f; background: #fff; }
.port-box i { font-size: 18px; }
.port-box.up { border-color: #2eca6a; color: #2eca6a; background: #e0f8e9; }
.port-box.down { border-color: #ff4d4d; color: #ff4d4d; background: #ffe6e6; }
.port-box.shut { border-color: #ccc; color: #999; }
.port-box.pon { width: 64px; cursor: pointer; }
.nav-tabs .nav-link { font-size: 13px; color: #51678f; }
.nav-tabs .nav-link.active { color: var(--rc-primary); font-weight: 600; }
.progress-ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #2eca6a; background: conic-gradient(#2eca6a var(--p, 0%), #e9ecef 0); }
.progress-ring span { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; }

/* ---------- activity ---------- */
.act-card h6 { font-size: 24px; font-weight: 700; color: var(--rc-heading); margin: 0; }
.act-card .delta { font-size: 11px; }
.type-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; text-transform: lowercase; }
.type-login { background: #ffe6e6; color: #ff4d4d; } .type-update { background: #fff6dd; color: #b07d00; } .type-delete { background: #ffe6e6; color: #c0392b; }
.type-register { background: #e0f8e9; color: #1b8f4a; } .type-move { background: #eef1ff; color: var(--rc-primary); } .type-command { background: #eee; color: #444; }

/* ---------- users ---------- */
.access-chip { font-size: 10px; background: #eef1ff; color: var(--rc-primary); padding: 2px 6px; border-radius: 3px; margin: 1px; display: inline-block; }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.toast { font-size: 13px; }

/* ======================================================================
   TEMA "Mocha & Steel" — perpaduan coklat (mocha) & biru (steel blue)
   Permintaan MGN 2026-10-20. Semua override di bawah ini menimpa tema NiceAdmin biru.
   ====================================================================== */
:root {
  --rc-primary: #1f4e79;        /* steel blue */
  --rc-primary-dark: #163a5c;
  --rc-primary-light: #2d6aa3;
  --rc-heading: #3e2723;        /* dark mocha */
  --rc-text: #4a4039;
  --rc-bg: #f5f1ec;             /* warm cream */
  --rc-brown: #5d4037;
  --rc-brown-light: #8d6e63;
  --rc-sand: #efe7de;
  --rc-sidebar-grad: linear-gradient(180deg, #3e2723 0%, #4e342e 55%, #2c3e55 100%);
}
body { background: var(--rc-bg); color: var(--rc-text); }
a { color: var(--rc-primary); }
a:hover { color: var(--rc-primary-light); }

/* header */
.header { background: #fff; border-bottom: 3px solid var(--rc-brown); box-shadow: 0 2px 20px rgba(62, 39, 35, .08); }
.header .toggle-sidebar-btn, .header-nav .nav-icon, .header-nav .nav-profile, .logo span { color: var(--rc-heading); }
.header .search-form input { border-color: rgba(93, 64, 55, .25); color: var(--rc-heading); }
.header .search-form input:focus { border-color: var(--rc-primary); box-shadow: 0 0 0 .15rem rgba(31, 78, 121, .15); }
.header-nav .badge-number { background: var(--rc-primary) !important; }
.header-nav .profile .dropdown-item:hover { background: var(--rc-sand); }

/* sidebar: mocha → steel gradient, teks krem */
.sidebar { background: var(--rc-sidebar-grad); box-shadow: 0 0 20px rgba(62, 39, 35, .25); scrollbar-color: rgba(255,255,255,.25) transparent; }
.sidebar-nav .nav-heading { color: #c9b8ad; }
.sidebar-nav .nav-link { color: #f3ebe4; background: transparent; }
.sidebar-nav .nav-link i { color: #d7ccc8; }
.sidebar-nav .nav-link.collapsed { color: #e8dfd8; background: transparent; }
.sidebar-nav .nav-link.collapsed i { color: #bcaaa4; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link:not(.collapsed) { color: #fff; background: rgba(255, 255, 255, .10); }
.sidebar-nav .nav-link:hover i, .sidebar-nav .nav-link:not(.collapsed) i { color: #ffd9a8; }
.sidebar-nav .nav-link.active-page, .sidebar-nav .nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(31,78,121,.95), rgba(45,106,163,.75)); box-shadow: inset 3px 0 0 #ffd9a8; }
.sidebar-nav .nav-link.active-page i, .sidebar-nav .nav-link.active i { color: #ffd9a8; }
.sidebar-nav .nav-content a { color: #d7ccc8; }
.sidebar-nav .nav-content a:hover, .sidebar-nav .nav-content a.active { color: #fff; }
.sidebar-nav .nav-content a i { background-color: #a1887f; }
.sidebar-nav .nav-content a.active i { background-color: #ffd9a8; }
.sidebar-nav .sub-settings .nav-link { color: #e8dfd8; background: transparent; }
.sidebar-footer, .sidebar .text-muted { color: #bcaaa4 !important; }

/* cards & titles */
.card { border: 1px solid #e6ddd4; box-shadow: 0 2px 14px rgba(62, 39, 35, .06); border-radius: 8px; }
.card-title { color: var(--rc-heading); }
.card-title span, .breadcrumb, .breadcrumb a { color: var(--rc-brown-light); }
.breadcrumb .active, .pagetitle h1 { color: var(--rc-heading); }
.card-header { background: var(--rc-sand); border-bottom: 1px solid #e6ddd4; }
.card-icon.ic-primary { color: var(--rc-primary); background: #e7eef6; }
.info-card h6, .mini-stat b, .kv .val { color: var(--rc-heading); }
.mini-stat small, .table thead th, .section-label small { color: var(--rc-brown-light); }
.section-label b, .form-label.sm, .kv label { color: var(--rc-brown); }
.table thead th { border-bottom: 2px solid #e6ddd4; background: #faf7f3; }
.table-hover tbody tr:hover { background: #f3ecf4; background: var(--rc-sand); }
.badge-idx { background: #e7eef6; color: var(--rc-primary); }
.nav-tabs .nav-link { color: var(--rc-brown-light); }
.nav-tabs .nav-link.active { color: var(--rc-primary); border-bottom-color: #fff; font-weight: 600; }
.olt-img { background: var(--rc-sand); }
.olt-timeline .dot { box-shadow: 0 0 0 2px #e6ddd4; }

/* buttons & forms */
.btn-primary { background: var(--rc-primary); border-color: var(--rc-primary); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--rc-primary-dark) !important; border-color: var(--rc-primary-dark) !important; }
.btn-outline-primary { color: var(--rc-primary); border-color: var(--rc-primary); }
.btn-outline-primary:hover { background: var(--rc-primary); border-color: var(--rc-primary); }
.btn-secondary { background: var(--rc-brown); border-color: var(--rc-brown); }
.btn-secondary:hover { background: #4e342e; border-color: #4e342e; }
.btn-outline-secondary { color: var(--rc-brown); border-color: #c4b3a8; }
.btn-outline-secondary:hover { background: var(--rc-brown); border-color: var(--rc-brown); color: #fff; }
.btn-check:checked + .btn-outline-secondary { background: var(--rc-brown); border-color: var(--rc-brown); }
.bg-primary { background-color: var(--rc-primary) !important; }
.text-primary { color: var(--rc-primary) !important; }
.form-control:focus, .form-select:focus { border-color: var(--rc-primary-light); box-shadow: 0 0 0 .2rem rgba(31, 78, 121, .15); }
.form-check-input:checked { background-color: var(--rc-primary); border-color: var(--rc-primary); }
.page-item.active .page-link { background: var(--rc-primary); border-color: var(--rc-primary); }
.page-link { color: var(--rc-primary); }
.back-to-top { background: var(--rc-brown); }
.svc-box .svc-head { background: var(--rc-sand); }
.access-chip { background: #e7eef6; color: var(--rc-primary); }
.footer .copyright { color: var(--rc-brown-light); }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--rc-primary) !important; color: #fff !important; border-color: var(--rc-primary) !important; }

/* login */
.login-page { background: linear-gradient(135deg, #3e2723 0%, #5d4037 45%, #1f4e79 100%); min-height: 100vh; }
.login-page .logo span { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.login-page .card { border: 0; border-top: 4px solid #ffd9a8; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.login-page .credits { color: #e8dfd8 !important; }
.login-page .card-title { color: var(--rc-heading); }
