/**
 * site.css — INCENT MVC Core
 * Migrated from: Styles/Site.css (866 lines, WebForms-era)
 *
 * Migration strategy:
 *   • Legacy fixed-width layout (.page { width: 960px }) → responsive fluid
 *   • WebForms-specific classes (.textEntry, .passwordEntry, .failureNotification)
 *     → kept as aliases mapping to modern equivalents
 *   • Pixel-fixed header bars (width: 1731px) → removed; handled by _Layout.cshtml
 *   • Duplicate .popbtn declarations → deduplicated
 *   • IE-only hacks (filter: alpha, -moz-box-shadow) → removed
 *   • .blinkblink (text-decoration: blink, non-standard) → removed
 *   • CSS custom properties (variables) unified across main-layout.css and site.css
 */

/* ═══════════════════════════════════════════════════════════════
   1. DESIGN TOKENS (CSS custom properties)
   Canonical set — shared with main-layout.css and all views.
═══════════════════════════════════════════════════════════════ */
:root {
  /* Brand */
  --primary: #0d9dbc;
  --primary-dark: #0a7a94;
  --primary-deep: #065f74;
  --primary-light: #e8f9ff;

  /* Semantics */
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --green: #50c878;
  --gray: #696969;

  /* Neutrals */
  --bg: #ffffff;
  --surface: #f7fafb;
  --muted: #9ca3af;
  --text: #333333;
  --text-sm: #666666;
  --border: #e0e0e0;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.18);

  /* Layout */
  --radius: 8px;
  --radius-lg: 12px;
  --space: 16px;

  /* Legacy aliases (kept for backward-compat with migrated views) */
  --panel: #111827;
  --bg-alt: var(--surface);
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", Calibri, Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   Migrated from: h1-h6 block in Site.css (adapted from fixed em sizing)
═══════════════════════════════════════════════════════════════ */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0;
}

h1 {
  font-size: 1.6rem;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.2rem;
}
h4 {
  font-size: 1.05rem;
}
h5,
h6 {
  font-size: 0.95rem;
}

p {
  margin-bottom: 10px;
  line-height: 1.65;
}

/* a:link, a:visited { color: var(--primary); text-decoration: none; } */
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
a:active {
  color: var(--primary-deep);
}

/* ═══════════════════════════════════════════════════════════════
   4. PAGE LAYOUT
   Migrated from: .page, .header, .main, .leftCol, .footer
   Fixed width (960px) → fluid responsive
═══════════════════════════════════════════════════════════════ */
.page {
  background-color: var(--bg);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 16px auto;
  max-width: 1400px;
}

.main {
  padding: 0 12px;
  margin: 12px 8px 8px 8px;
  min-height: 420px;
}

.footer {
  color: var(--text-sm);
  padding: 8px 0;
  margin: 0 auto;
  text-align: center;
  line-height: normal;
}

/* ═══════════════════════════════════════════════════════════════
   5. PAGE HEADER (logo band)
   Migrated from: .page-header / .page-header .header-line / .blue-band
═══════════════════════════════════════════════════════════════ */
.page-wrapper {
  padding: 10px 10px 0;
}

.page-header {
  width: 100%;
}

.page-header .header-line {
  background: var(--primary);
  height: 9px;
  margin: 0;
}

.page-header .header-line.bottom {
  box-shadow: var(--shadow);
}

.page-header .logo-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(100% - 20px);
  padding: 10px;
  gap: 12px;
}

.page-header .logo-wrapper > img {
  height: 50px;
  width: 100px;
  object-fit: contain;
}

.page-header .logo-wrapper .blue-band {
  flex: 1;
  min-height: 20px;
  text-align: center;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   6. SIDENAV
   Migrated from: .sidenav block in Site.css
   Enhanced version is in main-layout.css; this file keeps the
   original selectors as aliases for backward compat.
═══════════════════════════════════════════════════════════════ */
#mySidenav {
  height: 100vh;
  width: 0;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    var(--primary-deep) 100%
  );
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.5s ease;
  border-radius: 0 var(--radius-lg) 0 0;
  padding-top: 60px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

#mySidenav.open {
  width: 260px;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
}

#mySidenav a {
  padding: 11px 12px 11px 28px;
  text-decoration: none;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.25s;
  border-left: 3px solid transparent;
}

#mySidenav a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #fff;
  color: #fff;
}

#mySidenav .closebtn {
  position: absolute;
  top: 0;
  right: 18px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

#mySidenav .closebtn:hover {
  color: #fff;
}

/* Overlay behind open sidenav */
#menuOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9998;
}

#menuOverlay.show {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   7. BUTTONS
   Migrated from: .addbtn, .popbtn, .popbtn2, .btn1, .button,
                  .buttondis, .passchangebtn
   Deduplicated + enhanced with hover/focus states.
═══════════════════════════════════════════════════════════════ */
.addbtn {
  box-shadow: var(--shadow);
  border-radius: 6px;
  border: none;
  background-color: var(--primary);
  color: #fff;
  height: 35px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.addbtn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}
.addbtn:active {
  transform: none;
  opacity: 0.9;
}

/* Colour variants */
.addbtn.gray {
  background: var(--gray) !important;
}
.addbtn.green {
  background: var(--green) !important;
}
.addbtn.danger {
  background: var(--danger) !important;
}

/* Filter/action buttons (popbtn) — merged duplicate declarations */
.popbtn {
  box-shadow: var(--shadow);
  border-radius: 6px;
  border: none;
  background-color: var(--primary);
  color: #fff;
  height: 35px;
  min-width: 80px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.popbtn:hover {
  background-color: var(--primary-dark);
}

.popbtn2 {
  box-shadow: var(--shadow);
  border-radius: 6px;
  border: none;
  background-color: var(--primary);
  color: #fff;
  height: 35px;
  width: 110px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.popbtn2:hover {
  background-color: var(--primary-dark);
}

.btn1 {
  box-shadow: var(--shadow);
  border-radius: 6px;
  border: none;
  background-color: var(--primary);
  color: #fff;
  height: 40px;
  width: 150px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn1:hover {
  background-color: var(--primary-dark);
}

/* Legacy wide buttons */
.button {
  box-shadow: var(--shadow);
  border: none;
  width: 300px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.button:hover {
  background-color: var(--primary-dark);
}

/* Hidden/disabled button */
.buttondis {
  border: none;
  width: 300px;
  height: 50px;
  background-color: var(--primary);
  color: var(--primary); /* invisible text */
  text-align: center;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Password change OK button */
.passchangebtn {
  box-shadow: var(--shadow);
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  height: 35px;
  width: 100px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.passchangebtn:hover {
  background-color: var(--surface);
}

/* Export button */
.exportBtn {
  background-image: url("/images/Download.png");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 16px 16px;
  padding-left: 30px;
}

/* ═══════════════════════════════════════════════════════════════
   8. FORM CONTROLS
   Migrated from: .box, .boxsresn, .ddl, fieldset, .textEntry,
                  .passwordEntry, input.textEntry, input.passwordEntry
═══════════════════════════════════════════════════════════════ */
fieldset {
  margin: 1em 0;
  padding: 1em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

fieldset p {
  margin: 2px 12px 10px 10px;
}

fieldset.login label,
fieldset.register label,
fieldset.changePassword label {
  display: block;
}

fieldset label.inline {
  display: inline;
}

legend {
  font-size: 1em;
  font-weight: 600;
  padding: 2px 8px;
  color: var(--primary);
}

/* Legacy input classes → modern styling */
input.textEntry,
input.passwordEntry {
  width: 320px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

input.textEntry:focus,
input.passwordEntry:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 157, 188, 0.15);
}

/* Dropdown / input widgets */
.box,
.boxsresn,
.ddl {
  box-shadow: var(--shadow-sm);
  border-radius: 6px;
  border: 1px solid var(--border);
  height: 28px;
  padding: 0 6px;
  font-size: 12px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

.box {
  width: 200px;
}
.boxsresn {
  width: 100px;
}
.ddl {
  width: 90px;
}

.box:focus,
.boxsresn:focus,
.ddl:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 157, 188, 0.15);
}

/* Account form container */
div.accountInfo {
  width: 42%;
}

/* ═══════════════════════════════════════════════════════════════
   9. STATUS BADGES
   Migrated from: .status-pending, .status-rejected, .status-approved
═══════════════════════════════════════════════════════════════ */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11.5px;
  vertical-align: middle;
  text-align: center;
  line-height: 20px;
  white-space: nowrap;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}
.status-approved {
  background: #d4edda;
  color: #155724;
  border: 1px solid #28a745;
}
.status-rejected {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #dc3545;
}

/* Legacy block versions (kept for GridView RowDataBound output) */
span.status-pending,
span.status-approved,
span.status-rejected {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
  text-align: center;
  height: 20px;
  line-height: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   10. INFO / ACTION BAR
   Migrated from: .info-action, .moving-label, .label-Strip-container
═══════════════════════════════════════════════════════════════ */
.info-action {
  padding: 10px 0;
}

.info-action .info {
  display: block;
  text-align: center;
  font:
    bold 14pt Calibri,
    sans-serif;
  padding: 0 0 10px;
}

.info-action .action {
  text-align: right;
  width: 100%;
}

.label-Strip-container {
  color: var(--danger);
}

/* Scrolling marquee-style label */
.movingLabel {
  display: block;
  color: var(--danger);
  font:
    bold 1rem/1.2 Calibri,
    sans-serif;
  text-align: center;
  margin: 10px 0;
  white-space: nowrap;
  overflow: hidden;
  animation: marqueeScroll 18s linear infinite;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Alias */
.moving-label {
  color: var(--danger);
  display: block;
  font:
    bold 1rem/1.2 Calibri,
    sans-serif;
  text-align: center;
  margin: 10px 0;
}

/* ═══════════════════════════════════════════════════════════════
   11. NOTIFICATION & BADGE
   Migrated from: .notification-badge, .badge, .notification
═══════════════════════════════════════════════════════════════ */
.notification-badge {
  position: absolute;
  top: 15%;
  right: 20px;
  background: var(--danger);
  color: white;
  padding: 0 8px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.badge {
  background: var(--danger);
  color: white;
  padding: 2px 8px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.notification {
  position: fixed;
  top: 30%;
  right: 20px;
  z-index: 1000;
  background: var(--bg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  display: none;
  transform: translateY(-50%);
  min-width: 240px;
}

/* ═══════════════════════════════════════════════════════════════
   12. ACTIVE STATE (sidenav items)
   Migrated from: .active
═══════════════════════════════════════════════════════════════ */
.active {
  background-color: var(--primary-deep) !important;
  color: white !important;
  font-weight: bold;
  border-left: 3px solid rgba(255, 255, 255, 0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════
   13. MISC UTILITIES
   Migrated from: .clear, .title, .bold, .hidden, .WrapText,
                  .rigg, .style1/2/3, .popblbtn, .modalBackground
═══════════════════════════════════════════════════════════════ */
.clear {
  clear: both;
}
.bold {
  font-weight: bold;
}
.hidden {
  display: none !important;
}
.rigg {
  text-align: left;
}

.WrapText {
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Legacy dimensions (kept for exact layout parity) */
.style1 {
  width: 42px;
  height: 17px;
}
.style2 {
  height: 17px;
  width: 876px;
}
.style3 {
  width: 639px;
}

/* Invisible placeholder button */
.popblbtn {
  border: none;
  background: transparent;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Modal overlay */
.modalBackground {
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 30;
}

/* Modal popup panel */
.modalpopup {
  border-radius: var(--radius-lg);
  position: relative;
  width: 450px;
  max-width: 95vw;
  padding: 20px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

/* Panel container */
.PanelB {
  border-radius: 15px 15px 0 0;
  background-color: var(--surface);
  width: 200px;
  height: 150px;
  box-shadow: var(--shadow);
}

/* Failure notification (WebForms compat alias) */
.failureNotification {
  font-size: 1.1em;
  color: var(--danger);
  font-weight: 500;
}

/* Submit button align */
.submitButton {
  text-align: right;
  padding-right: 10px;
}

/* Divider line */
.divider-line {
  box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════════════════════════
   14. BRAND / VERSION LOGO
   Migrated from: .brand_logo_container, .brand_logo,
                  .brand_logo1, .version-logo-container
═══════════════════════════════════════════════════════════════ */
.brand_logo_container {
  position: absolute;
  height: 100px;
  width: 170px;
  top: -75px;
  border-radius: 50%;
  background: var(--primary);
  padding: 10px;
  text-align: center;
}

.brand_logo {
  height: 150px;
  width: 150px;
  border-radius: 50%;
  border: 2px solid white;
}

.brand_logo1 {
  height: 50px;
  width: 120px;
  border: 3px solid var(--primary);
  object-fit: contain;
}

.version-logo-container {
  text-align: center;
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   15. SORT INDICATORS (sticky-header links)
   Migrated from: .header-sort, .sticky-header th a rules
═══════════════════════════════════════════════════════════════ */
.header-sort {
  text-decoration: none !important;
  cursor: pointer;
  color: inherit;
}

.sticky-header th a {
  text-decoration: none !important;
  font-weight: 600;
  color: inherit;
  position: relative;
  padding-right: 16px;
  display: inline-block;
}

.sticky-header th a::after {
  content: "⇅";
  position: absolute;
  right: 0;
  font-size: 11px;
  opacity: 0.65;
}

.sticky-header th a:hover::after {
  opacity: 1;
}

.sticky-header th a:link,
.sticky-header th a:visited,
.sticky-header th a:hover,
.sticky-header th a:active {
  text-decoration: none !important;
}

/* Hide a column entirely */
.hideCol {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   16. PRINT
═══════════════════════════════════════════════════════════════ */
@media print {
  #mySidenav,
  .sidebar-toggle,
  .refresh-button,
  .disclaimer-section,
  .addbtn,
  .popbtn,
  .popbtn2,
  .exportBtn,
  .notification {
    display: none !important;
  }

  body {
    background: white;
    margin: 0;
  }
  .page {
    box-shadow: none;
    border: none;
  }
  table {
    page-break-inside: auto;
  }
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════
   17. RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .page {
    padding: 12px;
    margin: 10px;
  }
  .main {
    margin: 8px 4px;
    padding: 0 6px;
  }
  .style2 {
    width: 100%;
  }
  .style3 {
    width: 100%;
  }
  .modalpopup {
    width: 95vw;
    left: auto;
  }
  .button,
  .buttondis {
    width: 100%;
  }
  .page-header .logo-wrapper .blue-band {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12.5px;
  }
  #mySidenav.open {
    width: 220px;
  }
  .addbtn,
  .popbtn,
  .popbtn2 {
    font-size: 12px;
  }
}
