/* ════════════════════════════════════════════════════
   JIRA-LIKE DESIGN SYSTEM & CUSTOM STYLES
   Project: Aplikasi PBJ KPBK
   Date: 2026-07-08
════════════════════════════════════════════════════ */

:root {
  --sidebar-width: 240px;
  --sidebar-bg: #0A2B5C;      /* Coretax Navy Blue */
  --sidebar-text: #E0E6ED;    /* Soft Gray-Blue */
  --sidebar-active-bg: #F2A900; /* Coretax Gold Yellow */
  --sidebar-active-text: #0A2B5C; /* Dark text on active */
  --topbar-height: 56px;
  --content-bg: #F3F4F6;      /* Modern light background */
  --card-bg: #FFFFFF;
  --border-radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --primary: #0A2B5C;         /* Coretax Primary */
  --success: #10B981;         /* Emerald Success */
  --danger: #EF4444;          /* Red Danger */
  --warning: #F2A900;         /* Coretax Accent Yellow */
  --info: #3B82F6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: var(--content-bg);
  color: #172B4D;
  font-size: 14px;
}

/* ── Layout Wrapper ── */
.wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  height: var(--topbar-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  flex: 1;
  padding: 15px 0;
  overflow-y: auto;
}

.nav-section-label {
  padding: 8px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-item.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left-color: var(--sidebar-active-text);
  font-weight: 600;
}

.nav-item i {
  width: 20px;
  margin-right: 12px;
  font-size: 16px;
  text-align: center;
}

.sidebar-footer {
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 35px);
}

.sidebar-footer .user-info i {
  font-size: 24px;
  color: #FFFFFF;
}

.sidebar-footer .user-name {
  font-weight: 600;
  color: #FFFFFF;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer .user-role {
  font-size: 11px;
  color: var(--sidebar-text);
}

.sidebar-footer .btn-logout {
  color: var(--sidebar-text);
  font-size: 16px;
  padding: 5px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.sidebar-footer .btn-logout:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

/* ── Main Content Area ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0; /* Prevents flex items from overflowing */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Navbar ── */
.top-navbar {
  height: var(--topbar-height);
  background-color: #FFFFFF;
  border-bottom: 2.5px solid #F2A900; /* Yellow Accent */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(10, 43, 92, 0.02);
}

.btn-sidebar-toggle {
  background: none;
  border: none;
  color: #5E6C84;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: none;
}

.btn-sidebar-toggle:hover {
  background-color: #F4F5F7;
}

.navbar-center .page-heading {
  font-size: 18px;
  font-weight: 600;
  color: #172B4D;
}

/* ── Page Content ── */
.page-content {
  padding: 24px;
  flex: 1;
}

/* ── Cards / Stat Cards Coretax Style ── */
.stat-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(10, 43, 92, 0.03);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(10, 43, 92, 0.06);
}

.stat-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.bg-primary-soft { background-color: #EBF3FF; color: #0A2B5C; }
.bg-success-soft { background-color: #E6FBF3; color: #10B981; }
.bg-danger-soft  { background-color: #FEE2E2; color: #EF4444; }
.bg-warning-soft { background-color: #FEF3C7; color: #F2A900; }
.bg-info-soft    { background-color: #E0F2FE; color: #0284C7; }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: #0A2B5C;
  line-height: 1.2;
}

.stat-value-sm {
  font-size: 18px;
  font-weight: 800;
  color: #0A2B5C;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: #4B5563;
  font-weight: 600;
  margin-top: 6px;
}

/* ── Table Card Container Coretax Style ── */
.table-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 25px rgba(10, 43, 92, 0.03);
  overflow: hidden;
}

.table-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #FFFFFF;
}

.table-card-footer {
  padding: 14px 24px;
  border-top: 1px solid #E5E7EB;
  background-color: #FAFAFA;
}

.table thead th {
  background-color: #0A2B5C;
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
  padding: 14px 18px;
  vertical-align: middle;
}

.table tbody td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid #E5E7EB;
  color: #374151;
  font-size: 13.5px;
}

.table tbody tr:hover td {
  background-color: #FFFDF7 !important; /* Soft yellow hover highlight */
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* ── Badges ── */
.badge-lengkap {
  background-color: #E6FBF3;
  color: #047857;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(4, 120, 87, 0.05);
}

.badge-belum {
  background-color: #FEE2E2;
  color: #B91C1C;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.05);
}

.bg-purple {
  background-color: #F3E8FF;
  color: #6B21A8;
}

/* ── Modal Design Coretax Style ── */
.modal-content {
  border-radius: 20px !important;
  border: none !important;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(10, 43, 92, 0.15) !important;
}

.modal-header {
  background-color: #0A2B5C;
  border-bottom: none;
  padding: 20px 28px;
  color: #FFFFFF;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  font-family: "Montserrat", sans-serif;
}

.modal-body {
  padding: 28px;
}
}

.modal-footer {
  border-top: 1px solid #DFE1E6;
  padding: 16px 24px;
  background-color: #FAFBFC;
}

.required-label::after {
  content: " *";
  color: var(--danger);
  font-weight: bold;
}

/* ── Login Page ── */
/* ── Login Page (Coretax DJP Centered Style) ── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #FFFDF6 0%, #E9EDF5 100%);
  margin: 0;
  padding: 40px 20px;
  position: relative;
}

/* Container Logo Coretax */
.coretax-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 24px;
  font-family: "Montserrat", -apple-system, sans-serif;
}

.logo-co {
  font-size: 32px;
  font-weight: 800;
  color: #0A2B5C;
  letter-spacing: -1px;
}

.logo-re-icon {
  width: 32px;
  height: 32px;
  background-color: #0A2B5C;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  margin: 0 1px;
  box-shadow: 0 2px 5px rgba(10, 43, 92, 0.3);
}

.logo-tax {
  font-size: 32px;
  font-weight: 800;
  color: #F2A900;
  letter-spacing: -1px;
}

/* Card Login */
.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background-color: #FFFFFF;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 30px rgba(10, 43, 92, 0.05);
  padding: 36px 32px;
}

.login-header {
  text-align: left;
  margin-bottom: 24px;
}

.login-header h3 {
  font-weight: 800;
  font-size: 24px;
  color: #0A2B5C;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: #6B7280;
  font-size: 13.5px;
  line-height: 1.5;
}

/* Custom form labels */
.login-page .form-label {
  color: #0A2B5C;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 6px;
}

/* Custom input style */
.login-page .input-group {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #D1D5DB;
  background-color: #F9FAFB;
  transition: all 0.2s ease;
}

.login-page .input-group:focus-within {
  border-color: #0A2B5C;
  box-shadow: 0 0 0 3px rgba(10, 43, 92, 0.1);
  background-color: #FFFFFF;
}

.login-page .input-group-text {
  background-color: transparent;
  border: none;
  color: #0A2B5C;
  padding-left: 14px;
  padding-right: 8px;
}

.login-page .form-control {
  border: none;
  background-color: transparent;
  padding: 10px 12px;
  font-size: 13.5px;
  color: #1F2937;
}

.login-page .form-control:focus {
  box-shadow: none;
  background-color: transparent;
}

/* Error/invalid state style */
.login-page .input-group.is-invalid-custom {
  background-color: #FEF2F2;
  border-color: #FCA5A5;
}

.login-page .input-group.is-invalid-custom .input-group-text {
  color: #EF4444;
}

.login-page .input-group.is-invalid-custom .form-control::placeholder {
  color: #FCA5A5;
}

.error-text-custom {
  color: #EF4444;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Custom pills switcher */
.login-page .nav-pills {
  background-color: #F3F4F6;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.login-page .nav-pills .nav-link {
  color: #4B5563;
  background-color: transparent;
  font-weight: 700;
  border-radius: 6px;
  font-size: 13px;
  padding: 8px 12px;
  transition: all 0.2s;
}

.login-page .nav-pills .nav-link.active {
  background-color: #FFFFFF;
  color: #0A2B5C;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Button Masuk */
.login-page .btn-primary {
  background-color: #0A2B5C;
  border-color: #0A2B5C;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(10, 43, 92, 0.15);
  transition: all 0.2s;
}

.login-page .btn-primary:hover {
  background-color: #051A3B !important;
  border-color: #051A3B !important;
  box-shadow: 0 4px 8px rgba(10, 43, 92, 0.25);
}

.login-card-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #F3F4F6;
  font-size: 12px;
  color: #6B7280;
}

/* Layout responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px;
    border-radius: 16px;
  }
  .login-page {
    padding: 20px 10px;
  }
}

/* ── Toast Styling ── */
.toast-custom {
  background-color: #FFFFFF;
  border: none;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(9, 30, 66, 0.25);
  font-size: 13px;
  overflow: hidden;
}

.toast-custom.success {
  border-left: 4px solid var(--success);
}

.toast-custom.error {
  border-left: 4px solid var(--danger);
}

/* Bootstrap extra utilities */
.btn-xs {
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 3px;
}

.opd-link {
  color: #0052CC;
  transition: color 0.1s;
}

.opd-link:hover {
  color: #0065FF;
  text-decoration: underline !important;
}

/* ── Responsive Styling ── */
@media (max-width: 991.98px) {
  .btn-sidebar-toggle {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ── Select2 Custom Integration in Input Group ── */
.login-page .input-group .select2-container--bootstrap-5 {
  flex: 1 1 auto;
  width: 1% !important;
}

.login-page .select2-container--bootstrap-5 .select2-selection {
  border: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.login-page .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  padding-left: 10px !important;
  font-size: 13.5px !important;
  color: #1F2937 !important;
}

.login-page .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
  color: #9CA3AF !important;
  font-size: 13.5px !important;
}

.login-page .select2-dropdown {
  border-color: #D1D5DB !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(10, 43, 92, 0.08) !important;
  overflow: hidden;
  font-size: 13.5px !important;
}

.login-page .select2-results__option--highlighted[aria-selected] {
  background-color: #0A2B5C !important;
  color: #FFFFFF !important;
}

.login-page .select2-search__field {
  border-radius: 6px !important;
  border: 1px solid #D1D5DB !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
}

/* ── Global Button Primary Coretax Overrides ── */
.btn-primary {
  background-color: #0A2B5C !important;
  border-color: #0A2B5C !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #051A3B !important;
  border-color: #051A3B !important;
  color: #FFFFFF !important;
}

/* ── Top Navbar Badge / Label Tahun Coretax Style ── */
.top-navbar .badge.bg-primary {
  background-color: #F2A900 !important; /* Kuning Emas DJP */
  color: #0A2B5C !important;            /* Text Navy */
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 2px 5px rgba(242, 169, 0, 0.2);
}

/* ── Sidebar Footer & Logout Beautification ── */
.sidebar-footer {
  padding: 16px 20px !important;
  background-color: #051A3B !important; /* Darker Navy */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer .btn-logout {
  background-color: #EF4444 !important; /* Red Pill */
  color: #FFFFFF !important;
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.sidebar-footer .btn-logout:hover {
  background-color: #DC2626 !important;
  transform: scale(1.1);
}

/* ── Sidebar Icons Colorization ── */
.nav-item i {
  color: #F2A900 !important; /* Kuning Emas DJP */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-item.active i {
  color: #0A2B5C !important; /* Navy Blue kontras dengan background aktif kuning */
}

.nav-item:hover:not(.active) i {
  transform: scale(1.15);
  opacity: 1;
}


