/*!
 * Pakai Server Framework B4J Project Template v6.90 by @pyhoon (https://github.com/pyhoon/pakai-server-b4j)
 * Copyright (c) 2022-2026 Poon Yip Hoon (Aeric)
 * Licensed under MIT (https://github.com/pyhoon/pakai-server-b4j/blob/main/LICENSE)
 */
 
 /* Import Fraunces Variable Font from a public CDN */
@import url('https://googleapis.com');
 
body {
    font-family: Arial, Fraunces, Helvetica, Tahoma, Times New Roman;
}

button {
    border-radius: 3px;
}

button:focus {
    outline: 0px;
}

.error {
    font-size: 0.8em;
    color: red;
}

.edit,
.delete {
    cursor: pointer;
}

.edit:hover,
.delete:hover {
    font-size: 1.2rem;
}

.table-hover {
  --bs-table-hover-bg: #E5F3FD;
}

.bottom {
    position: relative;
    width: 100%;
    margin-top: 30px;
    margin-bottom: 60px;
}

.footer {
    position: fixed;
    padding: 10px 10px 0px 10px;
    bottom: 0;
    width: 100%;
    height: 60px;
}

@media screen and (max-width: 768px) {
    .footer {
        height: 60px;
    }
}

/* ===================================================================
   NDSH theme — shared shell, table, pills, modal, sidebar
   Appended; ndsh-* namespaced. :root unified under --ndsh-*.
   =================================================================== */
:root {
  --ndsh-navy:       #122B4E;
  --ndsh-navy-dark:  #0c1e37;
  --ndsh-navy-hover: #0d1f38;
  --ndsh-navy-mid:   #1a3a62;
  --ndsh-gold:       #C8961C;
  --ndsh-gold-dim:   rgba(200, 150, 28, .15);
  --ndsh-gold-light: rgba(200, 150, 28, .12);
  --ndsh-gold-text:  #7a5c0e;
  --ndsh-alert:      #d63030;
  --ndsh-alert-dim:  rgba(214, 48, 48, .12);
}

/* ── Page background / base ── */
body {
  background-color: #f4f6fa;
  min-height: 100vh;
  font-size: .9rem;
}

/* ── Layout shell: fixed sidebar + offset content wrapper ── */
.ndsh-sidenav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: max(240px, 20%);
  background-color: var(--ndsh-navy);
  display: flex;
  flex-direction: column;
  padding: 1.25rem .75rem 1rem;
  overflow-y: auto;
  box-shadow: 4px 0 18px rgba(12, 30, 55, .3);
  z-index: 100;
}

.ndsh-content {
  margin-left: max(240px, 20%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Sidebar brand / logo placeholder ── */
.ndsh-brand-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .35rem;
  padding: .25rem 0 1rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ndsh-logo-placeholder {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--ndsh-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--ndsh-gold); font-weight: 700; font-size: 1.4rem;
}
.ndsh-brand-text {
  color: #fff; font-weight: 700; letter-spacing: .14em; font-size: .8rem;
}
.ndsh-brand-text .dot { color: var(--ndsh-gold); }

/* ── Nav lists / items ── */
.ndsh-nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.ndsh-nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .9rem; border-radius: .5rem;
  color: rgba(255,255,255,.78); font-size: .875rem; font-weight: 500;
  text-decoration: none; line-height: 1.3;
  border: 1px solid transparent;
  transition: background .14s, color .14s, border-color .14s;
}
.ndsh-nav-item:hover { background-color: rgba(255,255,255,.09); color: #fff; border-color: rgba(255,255,255,.08); }
.nav-icon { font-size: 1rem; flex-shrink: 0; width: 1.1rem; text-align: center; }
.nav-arrow { font-size: .7rem; color: rgba(255,255,255,.4); flex-shrink: 0; transition: transform .18s; }
.ndsh-nav-item:hover .nav-arrow { color: rgba(255,255,255,.7); }
.ndsh-nav-item[aria-expanded="true"] .nav-arrow { transform: rotate(90deg); }

/* active */
.ndsh-nav-active, .ndsh-nav-active:hover {
  background-color: rgba(200,150,28,.15); color: #fff;
  border-color: rgba(200,150,28,.45); font-weight: 600;
}
.ndsh-nav-active .nav-icon { color: var(--ndsh-gold); }

/* alert */
.ndsh-nav-alert, .ndsh-nav-alert:hover { background-color: var(--ndsh-alert); color: #fff; border-color: transparent; font-weight: 700; }
.ndsh-nav-alert:hover { background-color: #bf2828; }
.ndsh-nav-alert .nav-icon { color: #fff; }

/* divider */
.ndsh-nav-divider { display: flex; align-items: center; gap: .6rem; margin: 1rem .25rem .6rem; }
.ndsh-nav-divider::before, .ndsh-nav-divider::after { content: ''; flex: 1; height: 1px; background-color: rgba(200,150,28,.3); }
.ndsh-nav-divider span { font-size: .67rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(200,150,28,.75); white-space: nowrap; }

/* view items (gold) */
.ndsh-nav-view { background-color: rgba(200,150,28,.13); color: #e8b84b; border-color: rgba(200,150,28,.22); font-weight: 600; }
.ndsh-nav-view:hover { background-color: rgba(200,150,28,.25); color: #f5cc6a; border-color: rgba(200,150,28,.45); }
.ndsh-nav-view .nav-icon { color: var(--ndsh-gold); }

/* submenu (Inspections) */
.ndsh-subnav { list-style: none; padding: .2rem 0 .2rem 1.9rem; margin: 0; display: flex; flex-direction: column; gap: .15rem; }
.ndsh-subnav .ndsh-nav-item { padding: .45rem .8rem; font-size: .82rem; }

/* bottom / logout */
.ndsh-nav-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.ndsh-nav-logout { color: #f08080; border-color: rgba(214,48,48,.2); background-color: rgba(214,48,48,.08); font-weight: 600; }
.ndsh-nav-logout:hover { background-color: var(--ndsh-alert); color: #fff; border-color: transparent; }
.ndsh-nav-logout .nav-icon { color: #f08080; }
.ndsh-nav-logout:hover .nav-icon { color: #fff; }

/* ── Top navbar (content area) ── */
.ndsh-topbar {
  background-color: #fff;
  padding: .85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e4e9f0;
  box-shadow: 0 1px 3px rgba(18,43,78,.04);
}
.ndsh-topbar .tb-title { color: var(--ndsh-navy); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; }
.ndsh-topbar .tb-user { color: #5a6476; font-size: .85rem; }
.ndsh-topbar .tb-user .name { color: var(--ndsh-navy); font-weight: 600; }
.ndsh-topbar .tb-clock { color: #5a6476; font-size: .8rem; white-space: nowrap; }
.ndsh-topbar .tb-action { color: #5a6476; font-size: 1.1rem; line-height: 1; text-decoration: none; transition: color .14s; }
.ndsh-topbar .tb-action:hover { color: var(--ndsh-navy); }
.ndsh-topbar .tb-logout:hover { color: var(--ndsh-alert); }

/* ── Main content padding ── */
.ndsh-main { flex: 1; padding: 1.75rem 2rem; }

/* ── Toolbar ── */
.ndsh-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.ndsh-search .form-control { border-radius: .4rem 0 0 .4rem; border-color: #ced4da; font-size: .875rem; width: 280px; height: 38px; }
.ndsh-search .form-control:focus { border-color: var(--ndsh-navy); box-shadow: 0 0 0 .2rem rgba(18,43,78,.15); z-index: 1; }
.ndsh-btn-search { background-color: var(--ndsh-navy); border-color: var(--ndsh-navy); color: #fff; border-radius: .4rem; font-size: .875rem; height: 38px; padding: 0 1.1rem; font-weight: 500; }
.ndsh-btn-search:hover { background-color: var(--ndsh-navy-hover); border-color: var(--ndsh-navy-hover); color: #fff; }
.ndsh-btn-add { background-color: var(--ndsh-navy); border-color: var(--ndsh-navy); color: #fff; font-weight: 600; font-size: .875rem; padding: .42rem 1.1rem; border-radius: .4rem; text-decoration: none; }
.ndsh-btn-add:hover { background-color: var(--ndsh-navy-hover); border-color: var(--ndsh-navy-hover); color: #fff; }

/* ── Table card ── */
.ndsh-table-card { background: #fff; border-radius: .75rem; overflow: hidden; box-shadow: 0 1px 4px rgba(18,43,78,.08), 0 4px 16px rgba(18,43,78,.06); border: 1px solid #e4e9f0; }
.ndsh-table { margin: 0; width: 100%; }
.ndsh-table thead tr { background-color: #f0f3f8; }
.ndsh-table thead th { color: var(--ndsh-navy); font-weight: 700; font-size: .8rem; padding: .75rem 1rem; border-bottom: 2px solid #dce3ee; border-right: 1px solid #dce3ee; white-space: nowrap; }
.ndsh-table thead th:last-child { border-right: none; padding-right: 1.25rem; }
.ndsh-table thead th:first-child { padding-left: 1.25rem; }
.ndsh-table tbody tr { border-bottom: 1px solid #eef1f6; transition: background .1s; }
.ndsh-table tbody tr:last-child { border-bottom: none; }
.ndsh-table tbody tr:hover { background-color: #f8f9fc; }
.ndsh-table tbody td { padding: .75rem 1rem; vertical-align: middle; color: #3a4257; border: none; }
.ndsh-table tbody td:first-child { padding-left: 1.25rem; }
.ndsh-table tbody td:last-child { padding-right: 1.25rem; }
.col-id { color: #8a93a8; font-size: .82rem; font-weight: 600; width: 50px; text-align: center; }
.user-link { color: var(--ndsh-navy); font-weight: 600; text-decoration: none; }
.user-link:hover { color: var(--ndsh-gold); text-decoration: underline; }
.col-username { font-family: 'Courier New', monospace; font-size: .85rem; color: #4a5568; }

/* ── Pills ── */
.role-badge { display: inline-block; background-color: rgba(18,43,78,.07); color: var(--ndsh-navy); font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: .3rem; font-family: 'Courier New', monospace; }
.scope-badge { display: inline-block; background-color: var(--ndsh-gold-light); color: #7a5c0e; font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: .3rem; }
.active-yes { display: inline-flex; align-items: center; gap: .3rem; background-color: #edfaf3; color: #1a7d4a; font-size: .75rem; font-weight: 700; padding: .22rem .65rem; border-radius: 2rem; border: 1px solid #b6ecd1; }
.active-yes::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background-color: #1a7d4a; display: inline-block; flex-shrink: 0; }
.active-no { display: inline-flex; align-items: center; gap: .3rem; background-color: #fff0f0; color: #c0392b; font-size: .75rem; font-weight: 700; padding: .22rem .65rem; border-radius: 2rem; border: 1px solid #f5c6cb; }
.active-no::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background-color: #c0392b; display: inline-block; flex-shrink: 0; }
.table-footer-bar { height: 4px; background-color: var(--ndsh-gold); }

/* ── View button ── */
.btn-view { display: inline-block; font-size: .75rem; font-weight: 600; padding: .28rem .8rem; border-radius: .3rem; text-decoration: none; background-color: rgba(18,43,78,.07); color: var(--ndsh-navy); border: 1px solid rgba(18,43,78,.18); cursor: pointer; }
.btn-view:hover { background-color: var(--ndsh-navy); color: #fff; }

/* ── Detail modal ── */
.ndsh-modal .modal-content { border: none; border-radius: 1rem; overflow: hidden; box-shadow: 0 8px 40px rgba(18,43,78,.18); }
.ndsh-modal .modal-header { background-color: var(--ndsh-navy); padding: 1.25rem 1.75rem; border: none; }
.ndsh-modal .modal-header .modal-title { color: #fff; font-weight: 700; font-size: 1rem; }
.ndsh-modal .modal-header .modal-subtitle { color: rgba(255,255,255,.6); font-size: .8rem; margin-top: .1rem; }
.ndsh-modal .btn-close { filter: brightness(0) invert(1); opacity: .7; }
.ndsh-modal .btn-close:hover { opacity: 1; }
.ndsh-modal .modal-body { padding: 1.5rem 1.75rem; background: #fff; }
.ndsh-modal .modal-footer { padding: 1rem 1.75rem; background: #f8f9fc; border-top: 1px solid #e4e9f0; display: flex; justify-content: space-between; align-items: center; }
.modal-section-label { font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ndsh-gold); margin-bottom: .75rem; }
.detail-group { margin-bottom: .85rem; }
.detail-label { font-size: .72rem; font-weight: 600; color: #8a93a8; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .18rem; }
.detail-value { font-size: .88rem; color: #1e2a3a; font-weight: 500; }
.detail-value.mono { font-family: 'Courier New', monospace; font-size: .85rem; }
.modal-gold-bar { height: 4px; background-color: var(--ndsh-gold); }

/* ── Footer ── */
.ndsh-footer { text-align: center; padding: 1rem; font-size: .78rem; color: #8a93a8; border-top: 1px solid #e4e9f0; background: #fff; }

/* ── Dashboard tab bar ── */
.ndsh-tabs { border-bottom: 2px solid #e4e9f0; gap: .25rem; flex-wrap: wrap; }
.ndsh-tabs .nav-link.ndsh-tab {
  border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  background: transparent; color: #6b7689; font-weight: 500; font-size: .85rem;
  padding: .6rem 1rem; border-radius: 0; display: inline-flex; align-items: center;
  transition: color .14s, border-color .14s;
}
.ndsh-tabs .nav-link.ndsh-tab .bi { font-size: .95rem; }
.ndsh-tabs .nav-link.ndsh-tab:hover { color: var(--ndsh-navy); border-bottom-color: rgba(18,43,78,.25); }
.ndsh-tabs .nav-link.ndsh-tab.active {
  color: var(--ndsh-navy); font-weight: 700;
  background: transparent; border-bottom-color: var(--ndsh-gold);
}
.ndsh-tabs .nav-link.ndsh-tab.active .bi { color: var(--ndsh-gold); }
.ndsh-tab-body { padding-top: .25rem; }

/* Dashboard Overview stat cards */
.ndsh-overview-wrap {
    padding: 0.25rem 0;
}

.ndsh-stat-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    border: 1px solid #eef2f7;
    transition: 0.15s ease;
    height: 100%;
}
.ndsh-stat-card:hover {
    border-color: #d0d8e5;
    box-shadow: 0 4px 12px rgba(18,43,78,0.06);
}
.ndsh-stat-card-lg {
    padding: 1.2rem 1.5rem;
}
.ndsh-stat-card-lg .stat-number {
    font-size: 1.2rem;
}
.stat-number {
    line-height: 1.2;
}
.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5a6476;
}
.stat-trend {
    font-size: 0.75rem;
    color: #6c757d;
	padding: 0rem 0rem;
}
.stat-icon {
    flex-shrink: 0;
}

.ndsh-shop-header {
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ndsh-content-full {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1rem;
}

/* Darker modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.9) !important;
}
.modal-backdrop.show {
    opacity: 1 !important;
}