/* Overlay */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    -webkit-transform: translate3d(0,0,0);
}

#loading {
    border:1px solid #2a67ac;
    padding: 10px 10px 10px 60px;
    width: 300px;
    height: 100px;
    background: rgb( 255, 255, 255) url('../images/FhHRx-Spinner.gif') 10px 50% no-repeat;
    position: fixed;
    display: none;
    z-index: 3000;
}

#loading h4 { margin: 3px 0 0 0; padding: 0; color: #d80; }

.pull-right {
    float: right;
}

.non-local-image {
    display: inline-block;
    border: 3px dashed #eee;
    border-radius: 5px;
}

.non-local-image:after {
    background: url(../logo.php) center center no-repeat;
    background-size: cover;
    content: "";
    z-index: -1;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.3;
}

div.section-break {
    margin-top: 1em;
    margin-bottom: 0.5em;
    padding-top: 0.8em !important;
    border-top: 1px solid #ccc;
}

input.dp {
    width: 10em;
}

/* Custom css for datepicker */
.ui-datepicker-trigger {
    display:inline-block;
    border:0;
    padding:0;
    margin-left:2px;
    position:relative;
    top:-2px;
    width:16px;
    height:16px;
    background:inherit;
}

.draft-saved {
    background-color: black;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px 6px;
    border-radius: 3px;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    line-height: 14px;
    position: absolute;
    top: 3em;
    right: 0.5em;
}

.delete-draft:hover {
    background-color: #fc9f41 !important;
}

.notice_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #0a0; background: url('../assets/default/images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }

.warning_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #f26522; background: url('../assets/default/images/icons/alert.png') 10px 50% no-repeat #ffffdd; }

.error_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #a00; background: url('../assets/default/images/icons/error.png') 10px 50% no-repeat #fff0f0; }


/* Always 2 columns: Sidebar | Content */
.container {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "sidebar content"
    "footer footer";
  gap: 1rem;
}

/* Map areas */
.header  { grid-area: header; }
.sidebar { grid-area: sidebar; min-width: 0; }
.content { grid-area: content; min-width: 0; }
.footer  { grid-area: footer; }

/* Prevent overflow */
.content .table { overflow-x: auto; }
/* Crisp hairline on high-DPI screens */
/* Thin separator line (100% of container) */
.navline {
  height: 1px;
  background: #0c0e12; /* light gray */
  width: 100%;
  margin: .25rem 0 1rem;
}
.sidebar {
  border-right: 1px solid #000; /* thin black line */
  padding-right: 1rem;         /* add a little spacing from the border */
  height: auto;
}

/* Sidebar base */
.sidebar {
  border-right: 1px solid #000; /* thin black divider per your request */
  padding-right: 1rem;
}

/* List reset */
.sidenav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Items / links */
.sidenav-item + .sidenav-item { margin-top: .5rem; }

.sidenav-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .625rem;
  border: 1px solid #ececec;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  background: #fff;
  transition: background .2s ease, border-color .2s ease, transform .06s ease;
}

.sidenav-link:hover {
  background: #f7f7f7;
  border-color: #e5e5e5;
}

.sidenav-item.is-active .sidenav-link,
.sidenav-link[aria-current="page"] {
  background: #eef6ff;
  border-color: #cfe6ff;
  color: #0f3e78;
  font-weight: 600;
}

/* Icons: inherit currentColor so active/hover tint the SVGs too */
.sidenav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

/* Text */
.sidenav-text {
  line-height: 1.2;
  white-space: nowrap;
}

/* Optional: subtle press effect */
.sidenav-link:active { transform: translateY(1px); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sidenav-link { transition: none; }
}
/* ============ Layout ============ */
.container {
  --gap: 1rem;
  --maxw: 1200px;

  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: var(--gap);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr); /* sidebar | content */
  gap: var(--gap);
}

/* Hairline under default header (full-bleed) */
.navline-bleed {
  height: 1px;
  background: #e5e7eb;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Regions */
.sidebar  { border-right: 1px solid #000; padding-right: 1rem; min-width: 0; }
.content  { min-width: 0; }
.content .table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Overflow guards */
.content { overflow: hidden; word-wrap: break-word; overflow-wrap: anywhere; }
.content .table table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.content .table th, .content .table td { word-break: break-word; }
.content img, .content video, .content iframe { max-width: 100%; height: auto; }
.content pre, .content code, .thread-body pre { white-space: pre-wrap; word-break: break-word; }

/* ============ Sidebar Nav ============ */
.sidenav-list { list-style: none; margin: 0; padding: 0; }
.sidenav-item + .sidenav-item { margin-top: .5rem; }

.sidenav-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .625rem;
  border: 1px solid #ececec;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  background: #fff;
  transition: background .2s ease, border-color .2s ease, transform .06s ease;
}
.sidenav-link:hover { background: #f7f7f7; border-color: #e5e5e5; }
.sidenav-item.is-active .sidenav-link,
.sidenav-link[aria-current="page"] {
  background: #eef6ff;
  border-color: #cfe6ff;
  color: #0f3e78;
  font-weight: 600;
}

/* Icons inherit color for active/hover states */
.sidenav-icon svg { width: 18px; height: 18px; display: block; fill: currentColor; }
.sidenav-text { line-height: 1.2; white-space: nowrap; }
.sidenav-link:active { transform: translateY(1px); }

/* Content headings & messages */
.contentheader h2 { margin: 0 0 .5rem; font-size: 1.25rem; line-height: 1.2; }
.contentsubject { margin-bottom: .75rem; color: #555; }
.msg-notice, .msg-error { padding: .5rem .75rem; border-radius: 6px; font-size: .95rem; }
.msg-notice { background: #f0f7ff; border: 1px solid #d6e8ff; color: #174c8c; }
.msg-error  { background: #fff5f5; border: 1px solid #ffd6d6; color: #8c1a1a; }

/* Optional subtle page bg */
body { background: #f6f7f9; }

/* If you ever want mobile stacking, uncomment this:
@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #000; padding-right: 0; padding-bottom: 1rem; }
}
*/
/* Minimal fallback if Bootstrap isn't present */
.container {
  --gap: 1rem;
  --maxw: 1200px;
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: var(--gap);
  display: grid;
  grid-template-columns: 260px minmax(0,1fr); /* sidebar | content */
  gap: var(--gap);
}
.header, .sidebar, .content, .footer {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 1rem;
}
.sidebar { border-right: 1px solid #000; padding-right: 1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.col-sm-6 { min-width: 0; } /* grid children */
.card { border: 1px solid #e5e5e5; border-radius: 10px; background: #fff; }
.card-body { padding: 1rem; }
.card-title { margin: 0 0 .5rem; font-size: 1.125rem; }
.card-text { margin: 0 0 1rem; color: #555; }
.btn { display: inline-block; padding: .5rem .75rem; border-radius: 6px; text-decoration: none; }
.btn-primary { background: #0d6efd; color: #fff; }
.btn-primary:hover { filter: brightness(.95); }


.container {
  --gap: 1rem; --maxw: 1200px;
  width: min(100%, var(--maxw));
  margin: 0 auto; padding: var(--gap);
  display: grid; grid-template-columns: 1fr; gap: var(--gap);
}
.content .row {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 700px) {
  .content .row + .row { margin-top: 1rem; }
  /* two columns for the card row only */
  .content .row:nth-of-type(3) { grid-template-columns: 1fr 1fr; }
}
.card { border: 1px solid #e5e5e5; border-radius: 10px; background: #fff; }
.card-body { padding: 1rem; }
.card-title { margin: 0 0 .5rem; font-size: 1.125rem; }
.card-text { margin: 0 0 1rem; color: #555; }
.btn { display: inline-block; padding: .5rem .75rem; border-radius: 6px; text-decoration: none; }
.btn-primary { background: #0d6efd; color: #fff; }
.btn-primary:hover { filter: brightness(.95); }
/* Make the page container full-width (no max) */
.container {
  --gap: 1rem;
  /* Remove max width clamp */
  width: 100%;
  margin: 0;
  padding: var(--gap);
  display: grid;
  grid-template-columns: 1fr; /* single column */
  gap: var(--gap);
}
.container .content {
  padding-left: 5px !important;
  padding-right: 5px !important;
  box-sizing: border-box;
}

/* Ensure content fills the grid column */
.content {
  width: 100%;
  min-width: 0;      /* critical to allow content to use the full track */
}

/* Rows span fully; inner items won’t cause overflow */
.content .row {
  display: grid;
  grid-template-columns: 1fr; /* 1 column by default */
  gap: 1rem;
  margin: 0;                  /* remove any default margins */
}

/* Two equal columns for your cards on wider screens */
@media (min-width: 700px) {
  .content .row.cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tables and media fill width neatly */
.content .table,
.content .table table { width: 100%; }
.content .table { overflow-x: auto; }
.card-body {
  display: flex;
  flex-direction: column;   /* stack title, text, button */
  align-items: center;      /* center horizontally */
  justify-content: center;  /* center vertically */
  text-align: center;       /* center the text */
  min-height: 200px;        /* optional: gives cards a uniform height */
}
.btn{display:inline-block;padding:.45rem .8rem;border-radius:8px;text-decoration:none;
     border:1px solid transparent; font-weight:600; cursor:pointer}
.btn:disabled{opacity:.6;cursor:not-allowed}

/* Colors */
.btn-submit{background:#2563eb;border-color:#1d4ed8;color:#fff}  /* blue */
.btn-submit:hover{filter:brightness(.96)}

.btn-refresh{background:#16a34a;border-color:#15803d;color:#fff} /* green */
.btn-refresh:hover{filter:brightness(.96)}

.btn-cancel{background:#dc2626;border-color:#b91c1c;color:#fff}  /* red */
.btn-cancel:hover{filter:brightness(.96)}