/* =============================================================================
   File Tracking System - Forest Department, Jharkhand
   site.css - Complete stylesheet (no frameworks)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Reset & base
   ----------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption,
blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1C2833;
  background-color: #F4F6F8;
  min-height: 100vh;
}

a {
  color: #2E86C1;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* -----------------------------------------------------------------------------
   2. Layout
   ----------------------------------------------------------------------------- */
.page-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  padding-top: 84px;
}

.content-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  margin-left: 220px;
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
  overflow: hidden;
  transition: margin-left .18s ease;
}

.main-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 32px;
  scroll-behavior: auto;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #1C2833;
}

.page-subtitle {
  font-size: 13px;
  color: #5D6D7E;
  margin-top: 4px;
}

/* -----------------------------------------------------------------------------
   3. Header
   ----------------------------------------------------------------------------- */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: #1B4F72;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.topbar {
  display: flex;
  align-items: center;
  background: #dcf5e4;
  border-bottom: 1px solid #b8dfc8;
  padding: 4px 22px;
  min-height: 84px;
  height: 84px;
  position: fixed;
  left: 220px;
  right: 0;
  top: 0;
  z-index: 1000;
  overflow: visible;
  box-shadow: 0 1px 4px rgba(0, 50, 20, .08);
  gap: 12px;
  border-left: 1px solid #b8dfc8;
  transition: left .18s ease, border-left-color .18s ease;
}

.tb-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 6px;
  background: rgba(255, 255, 255, .75);
  color: var(--g800);
  cursor: pointer;
  flex-shrink: 0;
}

.tb-menu-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tb-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9);
  background: #fff;
  object-fit: contain;
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 50, 20, .14);
}

.tb-mid {
  flex: 1;
  min-width: 0;
}

.tb-dept {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--g700);
  line-height: 1.2;
  margin: 0;
}

.tb-mid h2 {
  font-family: 'Noto Serif', serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--g900);
  line-height: 1.15;
  margin: 2px 0 0;
}

.tb-tagline {
  font-size: 11.5px;
  color: var(--txt2);
  margin: 3px 0 0;
  line-height: 1.25;
}

.tb-tagline span {
  margin: 0 4px;
  color: var(--txt3);
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.tb-logo-right {
  position: relative;
  z-index: 1;
}

.header-user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.tb-user-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tb-user-menu {
  position: relative;
  z-index: 1100;
}

.tb-user-chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--txt);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease;
}

.tb-user-chevron-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform .15s ease;
}

.tb-user-chevron-btn:hover,
.tb-user-chevron-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, .55);
}

.tb-user-chevron-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.tb-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--g800);
  flex-shrink: 0;
}

.tb-user-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.header-username {
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
  white-space: nowrap;
}

.header-last-login {
  font-size: 13px;
  color: var(--txt3);
  margin-top: 2px;
  white-space: nowrap;
}

.tb-user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  bottom: auto;
  width: max-content;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: 0;
  z-index: 1200;
}

.tb-user-dropdown.is-open {
  display: block;
}

.tb-user-dropdown-item,
.tb-user-dropdown-item:link,
.tb-user-dropdown-item:visited {
  display: block;
  width: auto;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--g800);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  line-height: 1.3;
}

.tb-user-dropdown-item:hover {
  background: var(--g50);
  color: var(--g900);
  text-decoration: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-emblem {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2E86C1, #154360);
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.header-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.header-username {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
}

.header-last-login {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* -----------------------------------------------------------------------------
   4. Sidebar
   ----------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  bottom: 0;
  background-color: #154360;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  z-index: 900;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform .18s ease;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .content-area {
  margin-left: 0;
}

body.sidebar-collapsed .topbar {
  left: 0;
  border-left-color: transparent;
}

.sb-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sb-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  object-fit: cover;
  flex-shrink: 0;
}

.sb-logo-right {
  opacity: .9;
}

.sb-brand {
  flex: 1;
  overflow: hidden;
}

.sb-brand strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-brand span {
  display: block;
  color: rgba(255, 255, 255, .65);
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.sb-nav::-webkit-scrollbar {
  width: 3px;
}

.sb-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 2px;
}

.sidebar-user {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #2E86C1;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-text {
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-designation {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .15s;
  user-select: none;
  text-decoration: none;
}

.nav-ico {
  width: 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, .72);
  flex-shrink: 0;
}

.nav-ico svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-left-color: var(--g500);
}

.nav-item:hover .nav-ico,
.nav-item.active .nav-ico {
  color: #fff;
}

.sb-group-title {
  color: rgba(255, 255, 255, .36);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 14px 16px 6px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: 6px;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: #FFFFFF;
}

.nav-link.active {
  background-color: rgba(46, 134, 193, 0.22);
  border-left-color: #2E86C1;
  color: #FFFFFF;
  font-weight: 600;
}

.nav-icon {
  font-size: 15px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sb-forest-art {
  height: 100px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  margin-top: auto;
}

.sb-forest-art svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.sb-harit {
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  gap: 7px;
}

.sb-harit p {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, .65);
  line-height: 1.3;
}

@media (max-width: 900px) {
  .sb-group-title,
  .sb-forest-art,
  .sb-harit,
  .nav-item span:not(.nav-ico) {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
  }
  .nav-ico {
    width: auto;
    font-size: 16px;
  }
}

/* -----------------------------------------------------------------------------
   5. Breadcrumb
   ----------------------------------------------------------------------------- */
.breadcrumb-bar {
  background: #e9f3ee;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
}

.breadcrumb-item {
  color: #6d8476;
  font-size: 13px;
  line-height: 1.2;
}

.breadcrumb-item a {
  color: #6d8476;
}

.breadcrumb-separator {
  color: #96ab9f;
  user-select: none;
  font-size: 13px;
  line-height: 1;
}

.breadcrumb-item.active {
  font-weight: 600;
  color: #1f2a35;
}

/* -----------------------------------------------------------------------------
   6. Cards
   ----------------------------------------------------------------------------- */
.card {
  background-color: #FFFFFF;
  border: 1px solid #D5D8DC;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #D5D8DC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1C2833;
}

.card-body {
  padding: 18px;
}

.card-footer {
  padding: 12px 18px;
  border-top: 1px solid #D5D8DC;
  background-color: #FAFBFC;
  border-radius: 0 0 6px 6px;
}

/* -----------------------------------------------------------------------------
   7. Metric cards
   ----------------------------------------------------------------------------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  background-color: #FFFFFF;
  border: 1px solid #D5D8DC;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 44px auto;
  grid-template-areas:
    "icon value"
    "label label";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
  justify-items: start;
  justify-content: center;
  align-content: center;
  min-height: 100px;
}

.metric-card.highlight-danger {
  border-color: #E6B0AA;
  background-color: #FDF2F2;
}

a.metric-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.metric-card-link:hover,
a.metric-card-link:focus {
  border-color: #1B6B3A;
  box-shadow: 0 4px 14px rgba(27, 107, 58, 0.14);
  transform: translateY(-1px);
  outline: none;
}

a.metric-card-link.highlight-danger:hover,
a.metric-card-link.highlight-danger:focus {
  border-color: #c0392b;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.14);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  font-size: 0;
  background: #dcf5e4;
  grid-area: icon;
}

.metric-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.metric-grid .metric-card:nth-child(1) .metric-icon {
  background: #dcf5e4;
}
.metric-grid .metric-card:nth-child(1) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cline x1='9' y1='15' x2='15' y2='15'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(2) .metric-icon {
  background: #dbeafe;
}
.metric-grid .metric-card:nth-child(2) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpath d='M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpolyline points='13 2 13 9 20 9'/%3E%3Ccircle cx='12' cy='15' r='3'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(3) .metric-icon {
  background: #fef3c7;
}
.metric-grid .metric-card:nth-child(3) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(4) .metric-icon {
  background: #ede9fe;
}
.metric-grid .metric-card:nth-child(4) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(5) .metric-icon {
  background: #cffafe;
}
.metric-grid .metric-card:nth-child(5) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230891b2' stroke-width='2'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(6) .metric-icon {
  background: #fee2e2;
}
.metric-grid .metric-card:nth-child(6) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(7) .metric-icon { background: #dcfce7; }
.metric-grid .metric-card:nth-child(7) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(8) .metric-icon { background: #e0e7ff; }
.metric-grid .metric-card:nth-child(8) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234338ca' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(9) .metric-icon { background: #fef9c3; }
.metric-grid .metric-card:nth-child(9) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ca8a04' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(10) .metric-icon { background: #ffedd5; }
.metric-grid .metric-card:nth-child(10) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.metric-grid .metric-card:nth-child(11) .metric-icon { background: #f3e8ff; }
.metric-grid .metric-card:nth-child(11) .metric-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239333ea' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #1B4F72;
  line-height: 1.1;
  grid-area: value;
  justify-self: start;
}

.metric-label {
  font-size: 12px;
  color: #5D6D7E;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  grid-area: label;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   8. Forms
   ----------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1C2833;
  margin-bottom: 6px;
}

.form-label .req {
  color: #922B21;
  margin-left: 2px;
}

.form-control,
.form-control textarea,
input.form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #D5D8DC;
  border-radius: 6px;
  background-color: #FFFFFF;
  color: #1C2833;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  outline: none;
  border-color: #2E86C1;
  box-shadow: 0 0 0 2px rgba(46, 134, 193, 0.2);
}

.form-control:disabled,
.form-control[readonly] {
  background-color: #F4F6F8;
  color: #5D6D7E;
}

/* Date picker (Flatpickr) */
input.date-picker {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235D6D7E' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1H2zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.flatpickr-calendar {
  font-family: "Segoe UI", Arial, sans-serif;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(28, 40, 51, 0.15);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
  background: #2E86C1;
  border-color: #2E86C1;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: #2874A6;
  border-color: #2874A6;
}

.flatpickr-day.today {
  border-color: #1E8449;
}

.flatpickr-day.today:hover {
  background: #1E8449;
  border-color: #1E8449;
  color: #fff;
}

.flatpickr-months .flatpickr-month {
  background: #1E8449;
  color: #fff;
  border-radius: 8px 8px 0 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #fff;
  font-weight: 600;
}

.flatpickr-weekdays {
  background: #F4F6F8;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.form-col {
  flex: 1;
  min-width: 260px;
}

.form-col-grow {
  flex: 1;
  min-width: 200px;
}

.form-hint {
  font-size: 11px;
  color: #5D6D7E;
  margin-top: 4px;
}

fieldset.form-fieldset {
  border: 1px solid #D5D8DC;
  border-radius: 6px;
  padding: 12px 16px 16px;
  margin-bottom: 16px;
}

fieldset.form-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 6px;
  color: #1B4F72;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1C2833;
  cursor: pointer;
}

/* -----------------------------------------------------------------------------
   9. Buttons
   ----------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #1B4F72;
  border-color: #1B4F72;
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background-color: #154360;
  border-color: #154360;
  text-decoration: none;
  color: #FFFFFF;
}

.btn-secondary {
  background-color: #FFFFFF;
  border-color: #D5D8DC;
  color: #1C2833;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #F4F6F8;
  text-decoration: none;
  color: #1C2833;
}

.btn-accent {
  background-color: #2E86C1;
  border-color: #2E86C1;
  color: #FFFFFF;
}

.btn-accent:hover:not(:disabled) {
  background-color: #2874A6;
  border-color: #2874A6;
  text-decoration: none;
  color: #FFFFFF;
}

.btn-danger {
  background-color: #922B21;
  border-color: #922B21;
  color: #FFFFFF;
}

.btn-danger:hover:not(:disabled) {
  background-color: #7B241C;
  text-decoration: none;
  color: #FFFFFF;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 11px 20px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-link {
  background: none;
  border: none;
  color: #2E86C1;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   10. Tables
   ----------------------------------------------------------------------------- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid #D5D8DC;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background-color: #FFFFFF;
}

.data-table thead th {
  text-align: left;
  padding: 10px 12px;
  background-color: #1B4F72;
  color: #FFFFFF;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid #154360;
}

.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #EAECEE;
  vertical-align: middle;
  color: #1C2833;
}

.data-table tbody tr:hover {
  background-color: #F8F9FA;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .actions a {
  margin-right: 10px;
  font-weight: 600;
}

.data-table .actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.data-table td.action-cell {
  white-space: nowrap;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--g800);
  background: #fff;
  text-decoration: none;
}

.action-link:hover {
  background: var(--g50);
  border-color: #badfca;
  color: var(--g900);
  text-decoration: none;
}

.row-urgent {
  background-color: #FCF3CF !important;
}

.row-very-urgent {
  background-color: #FADBD8 !important;
}

.row-overdue {
  background-color: #FDEBD0 !important;
}

.table-summary-row td {
  font-weight: 600;
  background-color: #F4F6F8;
  border-top: 2px solid #D5D8DC;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #D5D8DC;
  font-size: 12px;
  background-color: #FFFFFF;
  color: #1C2833;
}

.pagination a:hover {
  background-color: #EBF5FB;
  text-decoration: none;
  border-color: #2E86C1;
}

.pagination span.current {
  background-color: #1B4F72;
  border-color: #1B4F72;
  color: #FFFFFF;
  font-weight: 600;
}

/* -----------------------------------------------------------------------------
   11. Badges
   ----------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-transit {
  background-color: #D6EAF8;
  color: #1B4F72;
}

.badge-at-table {
  background-color: #D1F2EB;
  color: #0E6655;
}

.badge-pending {
  background-color: #FCF3CF;
  color: #7D6608;
}

.badge-closed {
  background-color: #E5E7E9;
  color: #424949;
}

.badge-urgent {
  background-color: #FADBD8;
  color: #922B21;
}

.badge-very-urgent {
  background-color: #922B21;
  color: #FFFFFF;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #FFFFFF;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-super-admin {
  background-color: #6C3483;
}

.role-pccf {
  background-color: #1B4F72;
}

.role-pa-ps {
  background-color: #1A5276;
}

.role-section-officer {
  background-color: #0E6655;
}

.role-dfo {
  background-color: #784212;
}

.role-despatch {
  background-color: #5D4037;
}

.role-report-viewer {
  background-color: #424949;
}

/* -----------------------------------------------------------------------------
   12. Timeline
   ----------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 8px;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-line {
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 0;
  width: 2px;
  background-color: #D5D8DC;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px #D5D8DC;
}

.timeline-dot.transit {
  background-color: #2E86C1;
  box-shadow: 0 0 0 2px #2E86C1;
}

.timeline-dot.at-table {
  background-color: #1E8449;
  box-shadow: 0 0 0 2px #1E8449;
}

.timeline-dot.pending {
  background-color: #B7950B;
  box-shadow: 0 0 0 2px #B7950B;
}

.timeline-dot.closed {
  background-color: #7F8C8D;
  box-shadow: 0 0 0 2px #7F8C8D;
}

.timeline-dot.urgent {
  background-color: #922B21;
  box-shadow: 0 0 0 2px #922B21;
}

.timeline-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.timeline-main {
  flex: 1;
  min-width: 200px;
}

.timeline-date {
  font-size: 13px;
  font-weight: 700;
  color: #1C2833;
  margin-bottom: 4px;
}

.timeline-route {
  font-size: 13px;
  color: #1C2833;
  margin-bottom: 4px;
}

/* Dashboard / tables: from → to route chips */
.route-cell {
  min-width: 220px;
  max-width: 360px;
}

.route-flow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12px;
  line-height: 1.35;
}

.route-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 160px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border, #D5D8DC);
  background: var(--g50, #F8F9F9);
  color: #1C2833;
  font-weight: 600;
  word-break: break-word;
}

.route-chip.route-from {
  border-color: #A9DFBF;
  background: #EAFAF1;
}

.route-chip.route-to {
  border-color: #AED6F1;
  background: #EBF5FB;
}

.route-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5D6D7E;
  margin-bottom: 2px;
}

.route-arrow {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--g700, #566573);
  line-height: 1;
}

.route-arrow::before {
  content: "->";
  font-family: inherit;
}

.timeline-meta {
  font-size: 12px;
  color: #5D6D7E;
  margin-bottom: 2px;
}

.timeline-remarks {
  font-size: 12px;
  color: #5D6D7E;
  font-style: italic;
  margin-top: 6px;
}

/* -----------------------------------------------------------------------------
   13. Tabs
   ----------------------------------------------------------------------------- */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #D5D8DC;
  margin-bottom: 16px;
}

.tab-link {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #5D6D7E;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  background: none;
  margin-bottom: -1px;
}

.tab-link:hover {
  color: #2E86C1;
  background-color: #F4F6F8;
}

.tab-link.active {
  color: #1B4F72;
  background-color: #FFFFFF;
  border-color: #D5D8DC;
  border-bottom-color: #FFFFFF;
}

.tab-content {
  position: relative;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* -----------------------------------------------------------------------------
   14. Login page
   ----------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-bg {
  flex: 1;
  background-color: #1B4F72;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  padding: 28px 28px 24px;
}

.login-brand {
  text-align: center;
  margin-bottom: 20px;
}

.login-emblem {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2E86C1, #154360);
  border: 3px solid #D5D8DC;
}

.login-govt {
  font-size: 12px;
  font-weight: 600;
  color: #5D6D7E;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-dept {
  font-size: 13px;
  color: #1B4F72;
  font-weight: 600;
  margin-top: 4px;
}

.login-title {
  font-size: 18px;
  font-weight: 700;
  color: #1C2833;
  text-align: center;
  margin-bottom: 20px;
}

.login-footer {
  text-align: center;
  padding: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  background-color: #154360;
}

/* -----------------------------------------------------------------------------
   15. Step panels
   ----------------------------------------------------------------------------- */
.step-panel {
  border: 1px solid #D5D8DC;
  border-radius: 6px;
  background-color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 18px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: #EBF5FB;
  border-bottom: 1px solid #D5D8DC;
  border-radius: 6px 6px 0 0;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: #1B4F72;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
  color: #1B4F72;
}

.step-body {
  padding: 18px;
}

.mark-immediate-panel {
  margin-top: 20px;
}

.mark-immediate-panel .form-fieldset {
  margin-bottom: 12px;
}

.mark-immediate-panel .form-col-grow {
  flex: 1 1 100%;
  min-width: 280px;
}

/* -----------------------------------------------------------------------------
   16. Modal
   ----------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  background-color: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
  color: var(--g900);
  background: var(--g50);
}

.modal-body {
  padding: 18px;
  color: var(--txt);
}

.ack-modal-file {
  font-size: 13px;
  color: var(--txt2);
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfefc;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--g50);
}

/* -----------------------------------------------------------------------------
   17. Alert / notification
   ----------------------------------------------------------------------------- */
.alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #D5F5E3;
  border-color: #A9DFBF;
  color: #145A32;
}

.alert-danger {
  background-color: #FADBD8;
  border-color: #F5B7B1;
  color: #7B241C;
}

.alert-warning {
  background-color: #FCF3CF;
  border-color: #F9E79F;
  color: #7D6608;
}

.alert-info {
  background-color: #D6EAF8;
  border-color: #AED6F1;
  color: #1B4F72;
}

/* -----------------------------------------------------------------------------
   18. Utility classes
   ----------------------------------------------------------------------------- */
.text-muted {
  color: #5D6D7E;
}

.text-primary {
  color: #1B4F72;
}

.text-success {
  color: #1E8449;
}

.text-danger {
  color: #922B21;
}

.text-warning {
  color: #B7950B;
}

.fw-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }

.w-100 {
  width: 100%;
}

.text-right {
  text-align: right;
}

/* -----------------------------------------------------------------------------
   FTS New Design Theme Overrides
   ----------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Serif:wght@700&display=swap');

:root {
  --g900: #0d3b1a;
  --g800: #145226;
  --g700: #1a6630;
  --g600: #1f7a38;
  --g500: #2e9e4f;
  --g100: #e8f5ec;
  --g50: #f4faf6;
  --txt: #1a2e1f;
  --txt2: #4a6652;
  --txt3: #7a9882;
  --border: #d1e8d8;
  --bg: #eef7f1;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0, 50, 20, .10);
  --shadow-lg: 0 8px 32px rgba(0, 50, 20, .15);
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: var(--bg);
  color: var(--txt);
}

.header-bar {
  background: #fff;
  color: var(--txt);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 50, 20, .06);
}

.header-emblem {
  background: linear-gradient(145deg, #145226, #1f7a38);
}

.header-title {
  font-family: 'Noto Serif', serif;
  color: var(--g900);
}

.header-subtitle,
.header-last-login {
  color: var(--txt3);
}

.header-username {
  color: var(--txt);
}

.sidebar {
  background: linear-gradient(180deg, #0a2e12 0%, #071f0c 60%, #040f06 100%);
  border-right: none;
}

.sidebar-user {
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.sidebar-avatar {
  background: var(--g500);
  color: #fff;
}

.sidebar-user-name {
  color: #fff;
}

.nav-link {
  color: rgba(255, 255, 255, .72);
  border-left: 3px solid transparent;
  transition: all .15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-left-color: var(--g500);
}

.sidebar-footer {
  color: rgba(255, 255, 255, .65);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.content-area {
  background: transparent;
}

.main-content {
  padding: 20px 22px;
}

.page-title {
  color: var(--g900);
}

.page-subtitle {
  color: var(--txt3);
}

.card,
.metric-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.card-title {
  color: var(--txt);
  font-weight: 700;
}

.table-wrapper {
  border-radius: 10px;
}

.data-table thead th {
  background: var(--g50);
  color: var(--txt3);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.data-table tbody td {
  border-bottom: 1px solid #edf5f1;
}

.data-table tbody tr:hover td {
  background: #f9fdfb;
}

.btn-primary {
  background: var(--g800);
  border-color: var(--g800);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--g700);
  border-color: var(--g700);
}

.btn-secondary {
  background: #fff;
  color: var(--txt);
  border-color: var(--border);
}

.btn-accent {
  background: var(--g500);
  border-color: var(--g500);
  color: #fff;
}

.btn-accent:hover,
.btn-accent:focus {
  background: var(--g600);
  border-color: var(--g600);
}

.form-control,
input[type="text"],
input[type="password"],
input[type="date"],
select,
textarea {
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: #fafffe;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--g600);
  box-shadow: 0 0 0 2px rgba(31, 122, 56, .12);
}

.breadcrumb,
.breadcrumb a {
  color: var(--txt3);
}

.metric-card .metric-value {
  color: var(--txt);
}

.metric-card .metric-label {
  color: var(--txt3);
}

@media (max-width: 900px) {
  .page-wrapper {
    padding-top: 84px;
  }
  .content-area {
    margin-left: 56px;
  }
  .sidebar {
    width: 56px;
  }
  .topbar {
    left: 56px;
  }
  .sidebar-user-text {
    display: none;
  }
  .sb-logo-right {
    display: none;
  }
}

@media (max-width: 640px) {
  .content-area {
    margin-left: 0;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    left: 0;
    border-left: none;
  }
  .tb-menu-toggle {
    display: none;
  }
}

/* -----------------------------------------------------------------------------
   FTS Login Redesign
   ----------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: block;
  overflow: hidden;
}

.login-page .bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.login-page .bg-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #b8d9c0 0%, #9ecfae 30%, #80be94 60%, #62ab7c 100%);
}

.login-page .mtn-1,
.login-page .mtn-2,
.login-page .mtn-3 {
  position: absolute;
  bottom: 0;
  width: 100%;
}

.login-page .mtn-1 {
  height: 60%;
  background: linear-gradient(180deg, #8bc99e 0%, #5fa876 100%);
  clip-path: polygon(0 55%,7% 22%,15% 42%,25% 8%,35% 38%,45% 5%,55% 32%,65% 12%,75% 38%,85% 15%,95% 40%,100% 20%,100% 100%,0 100%);
  opacity: .6;
}

.login-page .mtn-2 {
  height: 48%;
  background: linear-gradient(180deg, #5aa474 0%, #2d7a4c 100%);
  clip-path: polygon(0 58%,10% 20%,20% 42%,32% 7%,44% 38%,56% 12%,67% 40%,78% 16%,90% 42%,100% 22%,100% 100%,0 100%);
  opacity: .75;
}

.login-page .mtn-3 {
  height: 38%;
  background: linear-gradient(180deg, #1f6b38 0%, #0d3b1a 100%);
  clip-path: polygon(0 62%,12% 20%,24% 46%,38% 10%,50% 44%,62% 18%,75% 44%,88% 16%,100% 36%,100% 100%,0 100%);
}

.login-page .fog {
  position: absolute;
  left: -10%;
  width: 120%;
  bottom: 30%;
  height: 90px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5));
  border-radius: 50%;
  animation: fogf 9s ease-in-out infinite alternate;
}

.login-page .leaf-l,
.login-page .leaf-r {
  position: absolute;
  top: 0;
  pointer-events: none;
}

.login-page .leaf-l {
  left: 0;
}

.login-page .leaf-r {
  right: 0;
  transform: scaleX(-1);
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-page .login-card {
  width: 100%;
  max-width: 410px;
  padding: 36px 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 50, 20, .28);
  backdrop-filter: blur(12px);
  text-align: center;
}

.login-page .emblem {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 50, 20, .15);
  overflow: hidden;
}

.login-page .emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.login-page .emblem svg {
  width: 100%;
  height: 100%;
  display: block;
}

.login-page .login-card h1 {
  font-family: 'Noto Serif', serif;
  font-size: 20px;
  color: #0d3b1a;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

.login-page .login-main-title {
  color: #0d3b1a !important;
}

.login-page .dept {
  font-size: 12px;
  color: var(--g700);
  font-weight: 600;
  margin-bottom: 3px;
}

.login-page .tagline {
  font-size: 11.5px;
  color: var(--txt2);
  margin-bottom: 20px;
}

.login-page .tagline span {
  margin: 0 5px;
}

.login-page .sign-in-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 14px;
}

.login-page .fg {
  text-align: left;
  margin-bottom: 12px;
}

.login-page .fg label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--txt2);
  margin-bottom: 5px;
}

.login-page .iw input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #fafffe;
  color: var(--txt);
  outline: none;
  transition: border-color .2s;
}

.login-page .iw input:focus {
  border-color: var(--g600);
}

.login-page .fg .iw {
  position: relative;
}

.login-page .eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--txt3);
  padding: 2px;
  line-height: 1;
}

.login-page .eye-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.login-page .forgot {
  font-size: 11.5px;
  color: var(--g600);
  text-align: right;
  font-weight: 500;
  margin: 4px 0 18px;
}

.login-page .btn-login {
  width: 100%;
  background: var(--g800);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}

.login-page .btn-login:hover {
  background: var(--g700);
}

.login-page .login-foot {
  font-size: 10.5px;
  color: var(--txt3);
  margin-top: 18px;
  line-height: 1.5;
  text-align: center;
}

@keyframes fogf {
  from { transform: translateY(0); opacity: .65; }
  to { transform: translateY(8px); opacity: .95; }
}

/* -----------------------------------------------------------------------------
   FTS Visual Density Tuning
   ----------------------------------------------------------------------------- */
.main-content {
  padding: 18px 20px 24px;
}

.card {
  padding: 14px 16px;
}

.card-header {
  padding: 10px 14px;
}

.card-body {
  padding: 12px 14px;
}

.data-table thead th {
  font-size: 10.5px;
  padding: 7px 10px;
}

.data-table tbody td {
  padding: 8px 10px;
  font-size: 12px;
}

.tab-nav {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  background: var(--g50);
  gap: 2px;
}

.tab-link {
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
}

.tab-link.active {
  background: #fff;
  color: var(--g800);
  border-color: transparent;
  box-shadow: 0 1px 3px rgba(0, 40, 15, .1);
}

.mr-2 {
  margin-right: 8px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.highlight-panel {
  background-color: #EBF5FB;
  border: 1px solid #AED6F1;
  border-radius: 6px;
  padding: 14px 16px;
}

.highlight-panel.danger-pending {
  background-color: #FADBD8;
  border-color: #F5B7B1;
}

.file-no-large {
  font-size: 22px;
  font-weight: 700;
  color: #1B4F72;
}

.file-no-readonly {
  display: block;
  font-weight: 700;
  color: #1B4F72;
  padding: 9px 12px;
  background-color: #F4F6F8;
  border: 1px solid #D5D8DC;
  border-radius: 6px;
}

.search-hero {
  max-width: 720px;
  margin: 0 auto 20px;
}

.search-hero .form-control {
  font-size: 16px;
  padding: 12px 14px;
}

.dash-hero {
  background: linear-gradient(135deg, #e0f2e6 0%, #c8e8d2 50%, #b2d9be 100%);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid #aacdb8;
}

.dash-hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 160px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35));
  pointer-events: none;
}

.hero-logo {
  height: 55px;
  width: 55px;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-family: 'Noto Serif', serif;
  font-size: 21px;
  color: var(--g900);
  line-height: 1.1;
}

.hero-text .dept {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--g700);
  margin-bottom: 2px;
}

.hero-tag {
  font-size: 11.5px;
  color: var(--txt2);
}

.hero-tag span {
  margin: 0 6px;
}

.hero-logo-right {
  height: 52px;
  width: 52px;
  object-fit: contain;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.slip-box {
  border: 1px dashed #5D6D7E;
  border-radius: 6px;
  padding: 16px;
  background-color: #FAFBFC;
}

.slip-box h2.slip-title {
  font-size: 16px;
  margin-bottom: 10px;
  color: #1B4F72;
}

.chart-placeholder {
  min-height: 220px;
  border: 1px dashed #D5D8DC;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5D6D7E;
  font-size: 13px;
  background-color: #FAFBFC;
  margin-bottom: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.search-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-bar-field {
  flex: 1;
  min-width: 120px;
}

.search-bar-filter {
  width: 200px;
  flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   19. Print styles
   ----------------------------------------------------------------------------- */
@media print {
  .sidebar,
  .header-bar,
  .breadcrumb-bar,
  .btn,
  .pagination-bar,
  .tab-nav,
  .modal-overlay {
    display: none !important;
  }

  .page-wrapper {
    padding-top: 0;
  }

  .content-area {
    margin-left: 0;
  }

  .main-content {
    padding: 0;
    overflow: visible;
  }

  .card,
  .step-panel {
    box-shadow: none;
    break-inside: avoid;
  }

  body {
    background: #FFFFFF;
  }
}

/* -----------------------------------------------------------------------------
   20. Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content-area {
    margin-left: 0;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .header-title {
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
  }
}

/* -----------------------------------------------------------------------------
   22. Mark File page theme alignment
   ----------------------------------------------------------------------------- */
.mark-page .page-title {
  font-family: 'Noto Serif', serif;
  color: var(--g900);
  font-size: 26px;
  font-weight: 700;
}

.mark-page .page-subtitle {
  color: var(--txt3);
  font-size: 14px;
}

.mark-page .step-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

.mark-page .step-header {
  background: linear-gradient(135deg, #e0f2e6 0%, #c8e8d2 50%, #b2d9be 100%);
  border-bottom: 1px solid #aacdb8;
}

.mark-page .step-number {
  background: var(--g800);
  border-radius: 8px;
}

.mark-page .step-title {
  color: var(--g900);
  font-weight: 700;
}

.mark-page .form-label,
.mark-page .radio-row label,
.mark-page fieldset.form-fieldset legend {
  color: var(--txt2);
}

.mark-page .file-no-large {
  color: var(--g900);
}

.mark-page .btn-primary {
  background: var(--g800);
  border-color: var(--g800);
}

.mark-page .btn-primary:hover,
.mark-page .btn-primary:focus {
  background: var(--g700);
  border-color: var(--g700);
}

.mark-page .data-table thead th {
  background: var(--g50);
  color: var(--txt3);
  border-bottom: 1px solid var(--border);
}

