/* 
 * Style: NetTicket B2B - Sistem Network Trouble Ticketing & SLA Tracking
 * PT. Visimedia Pratama Persada
 * Enterprise Standard Clean Architecture (100% Human-Crafted Developer Look)
 */

:root {
  --bs-body-bg: #f8fafc;
  --bs-body-color: #1e293b;
  --bs-primary: #1e40af;
  --bs-primary-rgb: 30, 64, 175;
  --bs-secondary: #64748b;
  --bs-success: #15803d;
  --bs-danger: #b91c1c;
  --bs-warning: #b45309;
  --bs-info: #0369a1;
  --bs-dark: #0f172a;
  --topbar-bg: #1e293b;
  --topbar-border: #334155;
  --border-color: #e2e8f0;
  --card-border: 1px solid #e2e8f0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   1. OXYGEN.ID STYLE 2-TIER ISP / TELCO HEADER
   ========================================================== */
.isp-header {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  z-index: 1030;
}

/* Tier 1: Top Dark Utility Strip */
.top-utility-bar {
  background-color: #0b132b;
  color: #94a3b8;
  font-size: 0.74rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-utility-bar .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  display: inline-block;
}

/* Tier 2: Main Brand Logo (Oxygen.id Style Vibrant Telco Logo) */
.brand-logo-isp {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-visi {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: -0.5px;
}

.logo-media {
  color: #ef4444;
  font-weight: 800;
}

.logo-tld {
  color: #10b981;
  font-weight: 800;
  font-size: 1.1rem;
}

.logo-corp-sub {
  font-size: 0.60rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Main Navbar Navigation Links on White */
.navbar-light .navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}

.navbar-light .navbar-nav .nav-item {
  white-space: nowrap !important;
  flex-shrink: 0;
}

.navbar-light .navbar-nav .nav-link {
  color: #334155 !important;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.5rem 0.75rem !important;
  white-space: nowrap !important;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: #0284c7 !important;
}

.navbar-light .navbar-nav .nav-link.active {
  color: #0284c7 !important;
  border-bottom: 2px solid #0284c7 !important;
  font-weight: 700;
}

/* Oxygen.id Action Pills (Green & Orange Buttons) */
.btn-pill-green {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  padding: 0.40rem 1.15rem;
  font-weight: 700;
  font-size: 0.80rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pill-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
  color: #ffffff !important;
}

.btn-pill-orange {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  padding: 0.30rem 0.85rem;
  font-weight: 700;
  font-size: 0.80rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pill-orange:hover,
.btn-pill-orange:focus,
.btn-pill-orange[aria-expanded="true"] {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.35);
  color: #ffffff !important;
}

.avatar-pill-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #ea580c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.user-pill-text {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.user-dropdown-menu {
  min-width: 240px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  padding: 0.5rem 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.user-dropdown-menu .dropdown-item {
  padding: 0.45rem 1rem;
  font-size: 0.80rem;
}

.user-dropdown-menu .dropdown-item:hover {
  background-color: #f1f5f9;
}

/* Tier 3: Sub-header Breadcrumb Bar */
.sub-header-bar {
  background-color: #f8fafc !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 0.45rem 0 !important;
  font-size: 0.78rem;
}

.sub-header-bar .breadcrumb {
  margin-bottom: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.sub-header-bar .breadcrumb-item a {
  color: #64748b;
  text-decoration: none;
}

.sub-header-bar .breadcrumb-item a:hover {
  color: #0284c7;
  text-decoration: underline;
}

.sub-header-bar .breadcrumb-item.active {
  color: #0f172a;
  font-weight: 600;
}

/* ==========================================================
   2. ENTERPRISE CARDS & STAT WIDGETS
   ========================================================== */
.card {
  background-color: #ffffff;
  border: var(--card-border);
  border-radius: 6px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.card-header {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.88rem;
  color: #0f172a;
  padding: 0.75rem 1rem;
}

.card-stat-b2b {
  border: var(--card-border);
  border-radius: 6px;
  background: #ffffff;
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-stat-b2b .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.card-stat-b2b .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.card-stat-b2b .stat-desc {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.card-stat-b2b.border-left-primary { border-left: 3px solid var(--bs-primary); }
.card-stat-b2b.border-left-warning { border-left: 3px solid var(--bs-warning); }
.card-stat-b2b.border-left-success { border-left: 3px solid var(--bs-success); }
.card-stat-b2b.border-left-danger { border-left: 3px solid var(--bs-danger); }
.card-stat-b2b.border-left-info { border-left: 3px solid var(--bs-info); }

/* ==========================================================
   3. STRUCTURED DATA TABLES
   ========================================================== */
.table-b2b {
  margin-bottom: 0;
  font-size: 0.85rem;
}

.table-b2b thead th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #cbd5e1;
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
  white-space: nowrap;
}

.table-b2b tbody td {
  padding: 0.75rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}

.table-b2b tbody td.font-monospace,
.table-b2b tbody td:first-child a {
  white-space: nowrap !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

/* ==========================================================
   4. BADGES & CIRCUIT IDS
   ========================================================== */
.badge {
  font-weight: 600;
  padding: 0.35em 0.6em;
  font-size: 0.72rem;
  border-radius: 4px;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.circuit-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  background-color: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.76rem;
  white-space: nowrap !important;
  display: inline-block;
  letter-spacing: 0.3px;
}

.btn {
  white-space: nowrap !important;
}

.btn-group, .btn-group-sm {
  white-space: nowrap !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
}

.btn-group .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap !important;
}

/* DataTables UI Cleanup */
.dataTables_wrapper .dataTables_length {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.dataTables_wrapper .dataTables_length select {
  font-size: 0.82rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  padding: 0.25rem 0.5rem;
  margin: 0 0.35rem;
  display: inline-block;
  width: auto;
}

.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.dataTables_wrapper .dataTables_filter input {
  font-size: 0.82rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  display: inline-block;
  width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: #0284c7;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* ==========================================================
   5. TIMELINE TRACKING
   ========================================================== */
.b2b-timeline {
  position: relative;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.b2b-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #cbd5e1;
}

.b2b-timeline-item {
  position: relative;
  margin-bottom: 1rem;
}

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

.b2b-timeline-marker {
  position: absolute;
  left: -1.5rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #93c5fd;
}

.b2b-timeline-marker.success {
  background: #16a34a;
  box-shadow: 0 0 0 1px #86efac;
}

.b2b-timeline-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
}

/* ==========================================================
   6. FORM CONTROLS
   ========================================================== */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.3rem;
}

.form-control, .form-select {
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.65rem;
}

.form-control:focus, .form-select:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.15);
}

.form-text {
  font-size: 0.74rem;
  color: #64748b;
}

/* ==========================================================
   7. PRINT STYLESHEET (Formal Letterhead)
   ========================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm 15mm 15mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 9pt;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print, 
  .navbar, 
  .app-header,
  .isp-header,
  .top-utility-bar,
  .navbar-custom,
  .sub-navbar,
  .sub-header-bar,
  footer, 
  .btn, 
  .dataTables_filter, 
  .dataTables_length, 
  .dataTables_paginate, 
  .dataTables_info,
  .alert-dismissible {
    display: none !important;
  }

  .container, .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .card-body {
    padding: 0 !important;
  }

  .table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .table th, .table td {
    border: 1px solid #333333 !important;
    padding: 4px 6px !important;
  }

  thead {
    display: table-header-group !important;
  }

  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}
