*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
.multi-select.disabled {
    opacity: 0.5;
    pointer-events: none;
}
#detailRows.detail-disabled {
    opacity: 0.55;
}

#detailRows.detail-disabled select,
#detailRows.detail-disabled input,
#detailRows.detail-disabled button {
    cursor: not-allowed;
}
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f3f3;
  color: #222;
/* HP/mobile: tampilkan hanya menu Rates.
   Menu lain muncul kembali di tablet/PC dengan lebar layar minimal 1024px (sekitar 10 inch ke atas). */
@media (max-width: 1023px) {
  .desktop-tablet-menu {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .desktop-tablet-menu {
    display: block;
  }
}
}
@media (max-width: 768px) {
  .active-users-float {
    display: none !important;
  }
}


.input-cost-road .combo-item {
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    background: #fff;

    /* FIX */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== TOP HEADER ===== */
.top-header {
  height: 42px;
  background: #3e3e3e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.top-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.sidebar-toggle-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.sidebar-toggle-btn:hover {
  background: rgba(255,255,255,0.12);
}

.sidebar-toggle-btn.is-disabled,
.sidebar-toggle-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.top-header-right {
  display: flex;
  color: #fff;
  align-items: center;
  gap: 10px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.header-username {
  color: #fff;
  font-weight: 600;
  text-decoration: none !important;
}

.header-sep {
  color: #ccc;
}

.header-logout {
  color: #fff;
  text-decoration: none;
}

.header-logout:hover {
  text-decoration: underline;
}

/* ===== LAYOUT ===== */
.layout {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 42px);
  margin: 0;
  padding: 0;
  align-items: stretch;
  position: relative;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 180px;
  background: #ececec;
  border-right: 1px solid #d1d1d1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 42px);
  transition: width .22s ease, opacity .22s ease, transform .22s ease;
  overflow: hidden;
}

.layout.sidebar-hidden .sidebar {
  width: 0;
  min-width: 0;
  border-right: 0;
  opacity: 0;
  transform: translateX(-100%);
}

.sidebar-menu {
  padding-top: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px 16px;
  font-size: 11px;
  line-height: 1.6;
  color: #0a3d91;
  text-align: center;
  border-top: 1px solid #d5d5d5;
  background: #e9e9e9;
}

.sidebar-footer div:first-child {
  font-weight: 600;
}

.menu-active {
  font-weight: 700;
  background: #cfdaf0;   /* lebih kuat dari sebelumnya */
  color: #0a3d91;
}

.menu-group {
  margin: 0;
}

.menu-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  padding: 10px 12px 6px;
  text-transform: uppercase;
}

.menu-link {
  display: block;
  width: 100%;
  padding: 9px 14px;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  border-top: 1px solid #f5f5f5;
  border-bottom: 1px solid #dddddd;
  background: #efefef;
}

.menu-link:hover {
  background: #17a8eb;
  color: #fff;
}

.submenu-link {
  padding-left: 26px;
}

.menu-active {
  font-weight: 700;
  background: #cfdaf0;   /* lebih kuat dari sebelumnya */
  color: #0a3d91;
}

.menu-active:hover {
  background: #17a8eb;
  color: #fff;
}

#menuHome:hover {
  background: #17a8eb;
  color: #fff;
}

/* ===== CONTENT ===== */
.main-content {
  flex: 1;
  min-width: 0;
  min-height: calc(100vh - 42px);
  margin: 0;
  padding: 0;
  background: #f6f6f6;
  transition: width .22s ease;
}

.hero-banner {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 42px);
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;

  background-image:
    linear-gradient(rgba(255,255,255,.30), rgba(255,255,255,.30)),
    url('https://images.pexels.com/photos/30705550/pexels-photo-30705550.jpeg?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay,
.content-area,
#contentArea {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 42px);
  margin: 0;
  padding: 0;
  background: transparent;
}

.hero-overlay {
  padding: 28px 30px;
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
  text-shadow: 0 1px 1px rgba(255,255,255,.6);
}

.hero-subtitle {
  font-size: 20px;
  color: #ffffff;
  max-width: 680px;
  line-height: 1.4;
  margin: 0;
}

#updateBox {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.update-content {
  width: 320px;
  background: #fff7ed;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-family: Arial, sans-serif;
}

.update-title {
  font-weight: 700;
  color: #b45309;
  margin-bottom: 8px;
  font-size: 18px;
}

.update-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 12px;
}

#btnUpdate {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

#btnUpdate:hover {
  opacity: 0.9;
}

.freight-container {
  padding: 20px;
  background: rgba(255,255,255,0.96);
  min-height: calc(100vh - 42px);
}

.hero-banner.has-content {
  background: #f3f3f3;
}

/* ===== COMING SOON MODAL ===== */
.coming-soon-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}

.coming-soon-modal.show {
  display: block;
}

.coming-soon-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.coming-soon-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 520px);
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.20);
  padding: 28px 28px 24px;
  text-align: center;
}

.coming-soon-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: #777;
  cursor: pointer;
}

.coming-soon-close:hover {
  color: #111;
}

.coming-soon-image {
  width: 160px;
  max-width: 100%;
  margin: 0 auto 18px;
  display: block;
}

.coming-soon-title {
  font-size: 30px;
  font-weight: 700;
  color: #1f2d3d;
  margin-bottom: 10px;
}

.coming-soon-message {
  font-size: 18px;
  line-height: 1.5;
  color: #5b6573;
  margin-bottom: 12px;
}

.coming-soon-feature {
  font-size: 15px;
  color: #0b3d91;
  font-weight: 600;
  margin-bottom: 20px;
}

.coming-soon-btn {
  margin-top: 25px;
  min-width: 120px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #1da1f2;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.coming-soon-btn:hover {
  background: #0d8ddb;
}
.active-users-float {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 20;
  width: auto;              /* ⬅️ AUTO */
  max-width: 90%;           /* biar tidak keluar layar */
}

.active-users-card.compact {
  background: rgba(219, 230, 243, 0.20);
  border: 1px solid rgba(184, 200, 216, 0.95);
  border-radius: 8px;
  box-shadow: none;
  padding: 12px 18px;
  backdrop-filter: blur(2px);

  display: inline-block;
  max-width: 420px;       /* ⬅️ batasi lebar */
}

.active-users-title {
  font-size: 24px;
  font-weight: 700;
  color: #0a71c8;
  text-align: right;
  margin-bottom: 10px;
}

.active-users-list.compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.active-user-row.compact {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 6px;
  display: grid;
  grid-template-columns: 120px 140px 100px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.col-user,
.col-menu,
.col-time {
  color: #000;
  font-size: 14px;
}

.active-user-row.compact:last-child {
  border-bottom: none;
}

.col-menu {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.menu-main {
  font-weight: 500;
}

.menu-sub {
  font-size: 12px;
  color: #555;
  margin-top: 3px;
}

.col-time {
  text-align: right;
  white-space: nowrap;
}

/* Baris 1 */
.menu-main {
  font-weight: 500;
}

/* Baris 2 */
.menu-sub {
  font-size: 12px;
  color: #555;
}

/* Kolom waktu */
.col-time {
  text-align: right;
  font-size: 13px;
}

.active-user-name,
.active-user-sep,
.active-user-time {
  color: #000;
}

.active-user-name {
  font-weight: 400;
}

.active-user-time {
  font-size: 14px;
}

/* ===== LOGIN STATE INSIDE HERO ===== */
.login-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,0.96);
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(0,0,0,.18);
  padding: 28px 28px 24px;
  margin-top: 28px;
}

.login-card-title {
  margin: 0 0 22px;
  font-size: 32px;
  font-weight: 700;
  color: #1f2d3d;
}

.success-box {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #e7f7ee;
  color: #0d7a46;
  font-size: 14px;
  font-weight: 700;
}

.error-box {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #ffe4e4;
  color: #c00000;
  font-size: 14px;
  font-weight: 700;
  white-space: pre-line;
}

.input-group {
  margin-bottom: 16px;
}

.form-input {
  width: 100%;
  height: 52px;
  border: 1px solid #d7dce5;
  outline: none;
  border-radius: 10px;
  background: #f7f8fa;
  padding: 0 16px;
  font-size: 16px;
  color: #111;
}

.form-input:focus {
  border-color: #1da1f2;
  background: #fff;
}

.form-input::placeholder {
  color: #7b8794;
}

.login-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 10px;
  background: #062a6a;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
  margin-top: 4px;
}

.login-btn:hover {
  background: #0a3d91;
}

.login-links {
  margin-top: 14px;
  text-align: center;
}

.login-links a {
  color: #24416f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.login-links a:hover {
  text-decoration: underline;
}

/* ===== LOGOUT BUTTON ===== */
.logout-link {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;

  background: #dfe6ee;
  color: #222;

  border-top: 1px solid #f5f5f5;
  border-bottom: 1px solid #dddddd;

  text-align: left;
}

.logout-link:hover {
  background: #17a8eb;
  color: #fff;
}

/* Footer text tetap di bawah */
.footer-info {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  color: #0a3d91;
}
.menu-bottom {
  margin-top: auto;
}

@media (max-width: 768px) {
  .layout {
    position: relative;
  }

  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
    height: calc(100vh - 42px);
    box-shadow: 4px 0 14px rgba(0,0,0,.18);
  }

  .layout.sidebar-hidden .sidebar {
    width: 0;
    min-width: 0;
    opacity: 0;
    transform: translateX(-100%);
    box-shadow: none;
  }
}


.terms-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100000;
}

.terms-modal.show {
  display: block;
}

.terms-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.terms-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 640px);
  max-height: 85vh;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
  padding: 24px;
}

.terms-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2d3d;
  margin-bottom: 14px;
}

.terms-message {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 14px;
}

.terms-content {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 18px;
}


.terms-actions {
  display: flex;
  justify-content: center;   /* ini bikin center */
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.force-login-extra {
  text-align: center;
  margin-top: 12px;
}

.force-login-extra::before {
  content: "or";
  display: block;
  margin: 10px 0;
  color: #999;
  font-size: 13px;
}
.terms-btn {
  min-width: 110px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.terms-btn-decline {
  background: #e5e7eb;
  color: #333;
}

.terms-btn-decline:hover {
  background: #d1d5db;
}

.terms-btn-agree {
  background: #f57c00;
  color: #fff;
}

.terms-btn-agree:hover {
  background: #e56f00;
}

.multi-select {
    position: relative;
    cursor: pointer;
}

.multi-select-display {
    padding: 4px;
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #999;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
    width: 100%;
}

.multi-select.open .multi-select-dropdown {
    display: block;
}

.multi-item {
    display: block;
    padding: 4px;
}
.multi-item:hover {
    background: #eee;
}

