:root {
  --green: #4f8c3a;
  --deep: #17372d;
  --mint: #eef6e9;
  --lime: #a9d35f;
  --ink: #17231f;
  --muted: #728079;
  --line: #dfe7e1;
  --paper: #fbfcfa;
  --danger: #d66054;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #edf1ed;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  height: 84px;
  background: #fff;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0 2vw;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* ── Left Branding Group ── */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.topbar-headline-wrap {
  display: flex;
  align-items: center;
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-text-green {
  color: #17372d;
}

.brand-text-ray {
  color: #4caf50;
}

.brand-text-nexus {
  color: #17372d;
}

.badge-i40 {
  background: #17372d;
  color: #a9d35f;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
  letter-spacing: normal;
  display: inline-block;
  line-height: 1;
}

/* ── Right section: nav + clock ── */
.topbar-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Nav menu ── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-btn:hover {
  background: var(--mint);
  color: var(--deep);
}

.nav-btn.active {
  background: var(--deep);
  color: #fff;
}

.monitor-nav-link {
  color: var(--muted);
}

/* ── Live Clock ── */
.topbar-clock-wrap {
  border-left: 1px solid var(--line);
  padding-left: 10px;
  text-align: right;
  min-width: 80px;
  flex-shrink: 0;
}
.topbar-clock-date {
  font-size: 10px;
  color: var(--muted);
  display: block;
  line-height: 1.3;
}
.topbar-clock-time {
  font-size: 13px;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  color: var(--green);
  display: block;
  line-height: 1.3;
}

/* ── Tablet (≤1100px): shrink nav text ── */
@media (max-width: 1100px) {
  .nav-btn {
    font-size: 11px;
    padding: 4px 7px;
  }
  .topbar-headline span {
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .topbar {
    padding: 0 14px;
  }
}

/* ── Mobile (≤768px): hide date, compact clock ── */
@media (max-width: 768px) {
  .topbar-clock-date {
    display: none !important;
  }
  .topbar-clock-time {
    font-size: 11px !important;
  }
  .topbar-clock-wrap {
    min-width: 55px !important;
    padding-left: 6px !important;
  }
  .topbar-headline span {
    font-size: 10px;
  }
}

/* ── Very small (≤480px): hide clock entirely ── */
@media (max-width: 480px) {
  .topbar-clock-wrap {
    display: none !important;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 150px;
  height: 56px;
  object-fit: contain;
}

.brand div {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.brand strong {
  font: 700 11px Manrope;
  letter-spacing: 0.10em;
  display: block;
}

.brand span,
.clock span {
  font-size: 12px;
  color: var(--muted);
}

.clock {
  text-align: right;
}

.clock b {
  display: block;
  font: 700 20px Manrope;
  color: var(--green);
}

.slider-shell {
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
  overflow: hidden;
  position: relative;
  background: var(--paper);
}

.slider {
  display: flex;
  width: 1100%;
  height: 100%;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.2, 1);
}

.slide {
  width: 9.0909%;
  height: 100%;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.slide-heading,
.analytics-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.2vh;

}

.slide-heading {
  background: #17372d;
  padding: 18px 25px;
  border-radius: 15px;
  margin-bottom: 20px;
}

.slide-heading h1 {
  color: #ffffff;
}

.eyebrow {
  color: #a9d35f;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 11px;
  color: var(--green);
}

.planning-table {
  width: 100%;
  height: auto;
  table-layout: fixed;
}

h1,
h2,
h3 {
  font-family: Manrope;
  margin: 0;
}

.slide h1 {
  font-size: clamp(32px, 2.5vw, 48px);
  font-weight: 800;
}

.report-meta {
  display: flex;
  gap: 28px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.report-meta span {
  display: flex;
  flex-direction: column;
}

.report-meta b {
  color: #ffffff;
  margin-top: 3px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 1.6vh;
}

.summary-card {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-card span {
  font-size: 12px;
  color: var(--muted);
}

.summary-card b {
  font: 800 42px Manrope;
}

.summary-card:nth-child(2) b {
  color: var(--green);
}

.summary-card:nth-child(3) b {
  color: #ca9132;
}

.summary-card:nth-child(4) b {
  color: var(--danger);
}

/* Custom class colors for project summary cards to prevent conflict with other dashboards */
.summary-card.total-projects b {
  color: var(--ink);
}
.summary-card.completed-target b {
  color: var(--green);
}
.summary-card.completed-delayed b {
  color: #ca9132;
}
.summary-card.inprogress-delayed b {
  color: var(--danger);
}
.summary-card.inprogress b {
  color: #3b82f6; /* Blue for regular In Progress */
}


.table-wrap {
  flex: 1;
  overflow: auto;
  border: 1px solid #cdd8d0;
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 100%;
  font-size: 20px;
  border-collapse: collapse;
}

th {
  font-size: 18px;
  padding: 18px 12px;
  border: 1px solid #b0c2b7;
}

td {
  font-size: 18px;
  padding: 18px 12px;
  font-weight: 600;
  border: 1px solid #b0c2b7;
}

tbody tr:nth-child(even) {
  background: #f7faf7;
}

tbody tr:hover {
  background: #eff7e9;
}

.status {
  padding: 5px 8px;
  border-radius: 99px;
  font-weight: 700;
  white-space: nowrap;
}

.status.completed,
.status.as-per-target {
  color: #39742b;
  background: #e6f3de;
}

.status.delayed {
  color: #a94138;
  background: #fae8e5;
}

.status.in-progress {
  color: #96681a;
  background: #fff1d7;
}

.status.active {
  color: #39742b;
  background: #e6f3de;
}

.status.due-crossed {
  color: #a94138;
  background: #fae8e5;
}

.status.pending {
  color: #96681a;
  background: #fff1d7;
}

.period-tabs {
  background: #e7ece8;
  padding: 4px;
  border-radius: 10px;
}

.period-tabs button {
  border: 0;
  background: transparent;
  padding: 9px 18px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}

.period-tabs button.active {
  background: var(--deep);
  color: #fff;
  box-shadow: 0 5px 15px rgba(23, 55, 45, 0.2);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) 2.1fr 1.15fr;
  gap: 18px;
  height: 100%;
}

.kpi-column {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
}

.kpi {
  background: var(--deep);
  color: #fff;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.kpi:nth-child(2) {
  background: var(--green);
}

.kpi:nth-child(3) {
  background: #dfeacb;
  color: var(--deep);
}

.kpi:after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  right: -20px;
  bottom: -32px;
}

.kpi span {
  font-size: 12px;
  opacity: 0.8;
}

.kpi b {
  font: 800 clamp(27px, 3vw, 48px) Manrope;
}

.kpi small {
  font-size: 11px;
  opacity: 0.72;
}

.chart-card,
.calendar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  min-width: 0;
  box-shadow: 0 18px 50px rgba(23, 55, 45, 0.06);
  height: 100%;
}

.chart-card {
  display: flex;
  flex-direction: column;
}

.card-title {
  display: flex;
  justify-content: space-between;
}

.card-title span {
  font-size: 11px;
  color: var(--muted);
}

.card-title h2 {
  font-size: 19px;
  margin-top: 4px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title .legend,
.card-title .legend span {
  font-size: 20px;
}

.legend i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 8px;
}

.legend i:nth-of-type(2) {
  background: #d9e6cc;
}

#productionChart {
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-head h2 {
  font-size: 18px;
}

.calendar-head button,
.slide-arrow {
  border: 0;
  cursor: pointer;
}

.calendar-head button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 22px;
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.weekdays {
  margin: 24px 0 8px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

.day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  position: relative;
}

.day.muted {
  color: #c6cec9;
}

.day.today {
  background: var(--deep);
  color: #fff;
  font-weight: 700;
}

.day.event:not(.today) {
  background: var(--mint);
  color: var(--green);
  font-weight: 700;
}

.day.event:after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  position: absolute;
  bottom: 4px;
}

.calendar-note {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 15px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}

.calendar-note i {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border: 2px solid var(--green);
  border-radius: 50%;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 70px;
  background: rgba(23, 55, 45, 0.72);
  color: #fff;
  font-size: 30px;
  z-index: 5;
  opacity: 0;
  transition: 0.2s;
}

.slider-shell:hover .slide-arrow {
  opacity: 1;
}

.slide-arrow.left {
  left: 0;
  border-radius: 0 10px 10px 0;
}

.slide-arrow.right {
  right: 0;
  border-radius: 10px 0 0 10px;
}

.slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: #b9c5bd;
  transition: 0.3s;
}

.slider-dots button.active {
  width: 28px;
  background: var(--green);
}

.progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #dbe3dd;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--green);
  transform-origin: left;
}

@keyframes countdown {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.admin-section {
  padding: 80px 6vw 100px;
  min-height: 100vh;
  background: var(--deep);
  color: #fff;
}

.admin-intro {
  max-width: 620px;
  margin-bottom: 30px;
}

.admin-intro h2 {
  font-size: 36px;
  margin: 6px 0;
}

.admin-intro p {
  color: #b8c9c0;
  line-height: 1.7;
}

.login-card {
  max-width: 480px;
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  padding: 28px;
}

.login-card form {
  display: grid;
  gap: 18px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: #54635c;
}

input,
select {
  width: 100%;
  border: 1px solid #d7e0da;
  border-radius: 9px;
  padding: 11px 12px;
  margin-top: 6px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(79, 140, 58, 0.12);
}

.primary {
  border: 0;
  background: var(--lime);
  color: var(--deep);
  padding: 12px 18px;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}

.form-message {
  min-height: 17px;
  margin: 0;
  font-size: 12px;
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.admin-panel {
  background: #f6f8f6;
  color: var(--ink);
  border-radius: 22px;
  overflow: hidden;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar b,
.admin-toolbar span {
  display: block;
}

.admin-toolbar span {
  font-size: 11px;
  color: var(--muted);
}

.admin-content {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 590px;
}

.admin-list {
  padding: 16px;
  border-right: 1px solid var(--line);
  overflow: auto;
  max-height: 720px;
}

.admin-item {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}

.admin-item:hover {
  border-color: var(--green);
}

.admin-item b,
.admin-item span {
  display: block;
}

.admin-item span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}

.admin-item-actions button {
  border: 0;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

.edit-btn {
  background: var(--mint);
  color: var(--green);
}

.delete-btn {
  background: #fae8e5;
  color: var(--danger);
}

.editor {
  padding: 24px;
}

.editor-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.editor-title button {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.form-grid .wide {
  grid-column: span 2;
}

.save-button {
  margin-top: 20px;
}

.slide-planning {
  overflow: hidden;
}

.planning-wrap {
  height: auto;
}

.planning-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  background: #fff;
}

.planning-table th {
  font-size: 7px !important;
  padding: 1px !important;
  line-height: 1.1;
}

.planning-table td {
  font-size: 24px;
  font-weight: 700;
  height: 70px;
  padding: 8px;
}

.planning-table td[contenteditable] {
  background: #fafafa;
  cursor: text;
}

.planning-table td:focus {
  outline: 2px solid #4f8c3a;
}

.planning-admin-wrap {
  margin-top: 20px;
  overflow: auto;
}

.planning-admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-bottom: 15px;
}

.planning-admin-table th {
  background: #17372d;
  color: #fff;
  padding: 12px;
}

.planning-admin-table td {
  border: 1px solid #ddd;
  padding: 6px;
}

.planning-admin-table textarea {
  width: 100%;
  height: 60px;
  border: none;
  resize: none;
  padding: 6px;
  font-size: 14px;
  outline: none;
}

.slide-planning,
.slide-analytics,
.slide-tracker {
  height: calc(100vh - 120px);
}

#planningEditor {
  margin: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 15px;
}

.planning-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.planning-admin-table th,
.planning-admin-table td {
  border: 1px solid #ddd;
  padding: 10px;
}

.planning-admin-table textarea {
  width: 100%;
  height: 80px;
  border: none;
  outline: none;
}

.hidden {
  display: none;
}

#planningEditor {
  grid-column: 1 / -1;
  margin: 0;
  background: #fff;
  padding: 20px;
  overflow-x: auto;
}

#planningEditor.hidden {
  display: none;
}

.planning-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.planning-admin-table th,
.planning-admin-table td {
  border: 1px solid #d6ddd7;
  padding: 8px;
  text-align: center;
}

.planning-admin-table textarea {
  width: 100%;
  min-height: 70px;
  border: none;
  resize: vertical;
  outline: none;
  background: #fff;
}


.slide-planning {
  overflow: hidden !important;
}

.planning-table th {
  font-size: 20px !important;
  font-weight: 700 !important;
  padding: 12px !important;
  border: 1px solid #b7c3bc;
  background: #17372d;
  color: #fff;
}

.planning-table td {
  height: 90px;
  border: 1px solid #c4cfca;
}

.planning-table td {
  height: 70px;
}

.slide h1 {
  font-size: 42px !important;
}

#purchase-editor-btn,
#production-editor-btn {

  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}


.slide-heading {
  background: #17372d;
  padding: 18px 25px;
  border-radius: 15px;
  margin-bottom: 20px;
}

.slide-heading h1 {
  color: #fff;
}

.eyebrow {
  color: #a9d35f;
}

.planning-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #cfd8d3;
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.planning-table {
  width: 100%;
  min-width: 100%;
  height: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.planning-table tbody tr {
  height: 20%;
}

.admin-toolbar>div:last-child {

  display: grid !important;

  grid-template-columns:
    1fr 1fr !important;

  gap: 6px !important;
}

.admin-toolbar button {

  height: 34px !important;

  font-size: 11px !important;

  padding: 0 6px !important;
}

.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-width: 180px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.dropdown-menu button {
  width: 100%;
  border: none;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.dropdown-menu button:hover {
  background: #f3f4f6;
}

.dropdown-menu.show {
  display: block;
}


.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 180px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu button {
  width: 100%;
  border: none;
  background: white;
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.dropdown-menu button:hover {
  background: #f5f5f5;
}

#planningEditor {
  margin-top: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  overflow-x: auto;
  width: 100%;
}

.planning-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.planning-admin-table th,
.planning-admin-table td {
  border: 1px solid #ccc;
  padding: 4px;
}

.planning-admin-table textarea {
  width: 100%;
  min-height: 70px;
  border: none;
  resize: vertical;
  padding: 6px;
  box-sizing: border-box;
}

.planning-admin-table th {
  background: #0f3f34;
  color: #fff;
}

.hidden {
  display: none !important;
}

/* ===============================
   MOBILE RESPONSIVE
================================== */

@media screen and (max-width:768px) {

  /* HEADER - Consolidated at bottom */

  /* SLIDER */

  .slider-shell {
    height: 58vh !important;
    min-height: 58vh !important;
  }

  .slider {
    width: 1100%;
  }

  .slide {
    width: 9.0909%;
    height: 60vh !important;
    min-height: 60vh !important;
    padding: 8px;
    overflow: hidden;
  }

  /* HEADINGS */

  .slide h1 {
    font-size: 24px !important;
    line-height: 1.2;
  }

  .slide-heading {
    padding: 12px;
  }

  .report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    width: 100%;
  }


  /* SUMMARY */

  .summary-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .summary-card {
    padding: 10px;
  }

  .summary-card b {
    font-size: 22px;
  }


  /* TABLE */

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 900px;
  }

  th {
    font-size: 12px;
    padding: 8px;
  }

  td {
    font-size: 12px;
    padding: 8px;
  }


  /* PURCHASE + PRODUCTION SLIDES */

  .slide-planning {
    min-height: 58vh !important;
    height: 58vh !important;
  }

  .planning-wrap {
    overflow-x: auto;
    border-radius: 12px;
  }

  .planning-table {
    min-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
  }

  .planning-table th {
    font-size: 9px;
    padding: 3px;
  }


  .planning-table td {
    font-size: 8px !important;
    height: 18px !important;
    padding: 1px !important;
  }

  /* ANALYTICS */

  .analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .kpi-column {
    display: grid;
    grid-template-columns: 1fr;
  }

  .kpi {
    min-height: 100px;
  }

  #productionChart {
    height: 220px !important;
  }


  /* CALENDAR */

  .calendar-card {
    overflow: hidden;
  }

  .day {
    min-height: 34px;
  }


  /* ADMIN */

  .admin-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-list {
    max-height: 250px;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }


  /* ADMIN TOOLBAR */

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-toolbar>div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }


  /* SMALL COMPACT BUTTONS */

  #purchase-editor-btn,
  #production-editor-btn,
  #add-project-btn,
  #logoutBtn {

    height: 38px;
    font-size: 12px;
    padding: 0 10px;
  }


  /* FORM */

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }


  /* PLANNING EDITOR */

  #planningEditor {
    padding: 10px;
    overflow-x: auto;
  }

  .planning-admin-table {
    min-width: 700px;
  }

  .planning-admin-table textarea {
    min-height: 50px;
    font-size: 12px;
  }

}

/* 1366px - 1600px Laptop Fix */

@media screen and (min-width:1366px) and (max-width:1600px) {

  .admin-panel {
    width: 100%;
    overflow: hidden;
  }

  .planning-admin-wrap {
    overflow-x: auto;
  }

  .planning-admin-table {
    min-width: 1200px;
  }

  .planning-admin-table th {
    font-size: 18px;
    padding: 10px 6px;
  }

  .planning-admin-table td {
    padding: 3px;
  }

  .planning-admin-table textarea {
    height: 55px;
    font-size: 15px;
    padding: 4px;
  }

  .editor h2 {
    font-size: 22px;
  }

}

.planning-table td {
  text-align: center !important;
  vertical-align: middle !important;

  font-size: 34px !important;
  font-weight: 800 !important;

  height: auto !important;

  padding: 0 !important;
}

@media screen and (max-width:768px) {

  .planning-table td {
    font-size: 12px !important;
    height: 40px !important;
    font-weight: 700 !important;
  }

  .planning-table td:first-child {
    font-size: 11px !important;
  }

  .planning-table tbody tr {
    height: 40px !important;
  }

}

@media screen and (max-width:768px) {

  .slide-heading {
    padding: 6px 10px !important;
    margin-bottom: 4px !important;
    min-height: 42px !important;
  }

  .slide h1 {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .eyebrow {
    font-size: 7px !important;
  }

  .planning-wrap {
    height: 52vh !important;
    min-height: 52vh !important;
    overflow: hidden !important;
  }

}

/* PURCHASE + PRODUCTION TABLE CENTER FIX */

.planning-table td {
  text-align: center !important;
  vertical-align: middle !important;

  font-size: 34px !important;
  font-weight: 800 !important;

  height: auto !important;

  padding: 0 !important;
}

.planning-table td:first-child {
  font-size: 20px !important;
  font-weight: 700 !important;
}

.planning-table tbody tr {
  height: auto !important;
}

@media screen and (max-width:768px) {

  .planning-table th {
    font-size: 6px !important;
    padding: 1px !important;
    line-height: 1 !important;
    height: 22px !important;
  }

  .planning-table td {
    font-size: 8px !important;
    height: 58px !important;
    min-height: 58px !important;
  }

  .planning-table td:first-child {
    font-size: 7px !important;
    font-weight: 700 !important;
    width: 38px !important;
  }

  .planning-table tbody tr {
    height: 58px !important;
  }

}

/* ===========================
   1024px - 1400px TABLE FIX
=========================== */

@media screen and (min-width:1024px) and (max-width:1400px) {

  .slide-planning {
    padding: 12px !important;
  }

  .slide-heading {
    padding: 12px 18px !important;
  }

  .slide h1 {
    font-size: 28px !important;
  }

  .planning-wrap {
    overflow: hidden !important;
  }

  .planning-table {
    min-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
  }

  .planning-table th {
    font-size: 12px !important;
    padding: 6px 2px !important;
    line-height: 1.1 !important;
  }

  .planning-table td {
    font-size: 20px !important;
    height: auto !important;
    font-weight: 700 !important;
  }

  .planning-table td:first-child {
    font-size: 16px !important;
    font-weight: 700 !important;
    width: 90px !important;
  }

  .planning-table tbody tr {
    height: auto !important;
  }

  .slide-arrow {
    width: 32px !important;
    height: 60px !important;
  }

}

/* =====================================
   ADMIN TABLE LAPTOP FIX
   1024px - 1400px
===================================== */

@media screen and (min-width:1024px) and (max-width:1400px) {

  .table-wrap {
    overflow-x: auto;
    width: 100%;
  }

  .table-wrap table {
    min-width: 100% !important;
    width: 100% !important;
  }

  .table-wrap th {
    font-size: 11px !important;
    padding: 10px 4px !important;
    white-space: normal !important;
  }

  .table-wrap td {
    font-size: 11px !important;
    padding: 10px 4px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .summary-card b {
    font-size: 30px !important;
  }

}

@media screen and (min-width:1024px) and (max-width:1400px) {

  .admin-panel {
    overflow: hidden;
  }

  .admin-content {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .admin-list {
    min-width: 280px;
  }

  .editor {
    overflow-x: auto;
  }

  .planning-admin-table {
    min-width: 1200px;
  }

}

/* =====================================
   PRODUCTION PERFORMANCE CALENDAR STYLE
   ===================================== */
.calendar-day {
  background: #fff;
  border: 1px solid #9ab0a4;
  position: relative;
  height: auto !important;
  vertical-align: top !important;
  padding: 8px !important;
}

.calendar-day .day-num {
  font-size: 18px;
  color: var(--deep);
  font-weight: 800;
  text-align: left;
}

.calendar-day .day-val {
  font-size: 38px;
  color: var(--green);
  font-weight: 900;
  text-align: center;
  margin-top: 6px;
  line-height: 1;
  font-family: Manrope, sans-serif;
}

.empty-day {
  background: #f3f7f4;
  border: 1px solid #9ab0a4;
  height: auto !important;
}

/* =====================================
   PRODUCTION PERFORMANCE SUMMARY CARDS
   ===================================== */
.production-summary {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.production-summary-card {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(23, 55, 45, 0.04);
}

.production-summary-card span {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.production-summary-card b {
  font-size: 24px;
  font-family: Manrope, sans-serif;
  color: var(--deep);
}

/* =====================================
   ADMIN PLANNER EXPORT SECTION STYLE
   ===================================== */
.admin-editor-section input[type="date"],
.admin-editor-section select {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  color: var(--deep);
}

.admin-editor-section input[type="date"]:focus,
.admin-editor-section select:focus {
  border-color: var(--green);
}

.admin-editor-section input[type="date"]:disabled {
  background: #f1f4f2;
  cursor: not-allowed;
  border-color: #e2e8e4;
}

.admin-editor-section button.primary {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  border: 1px solid transparent;
  color: #fff;
}

.admin-editor-section button.primary:hover {
  opacity: 0.9;
}

@media screen and (max-width: 768px) {
  .calendar-day {
    height: 60px !important;
    padding: 4px !important;
  }

  .calendar-day .day-num {
    font-size: 12px;
    font-weight: 800;
  }

  .calendar-day .day-val {
    font-size: 20px;
    font-weight: 900;
    margin-top: 2px;
  }

  .empty-day {
    height: 60px !important;
  }

  .production-summary {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }

  .production-summary-card {
    padding: 8px 10px;
  }

  .production-summary-card b {
    font-size: 18px;
  }

  .admin-editor-section button.primary {
    width: 100%;
  }

  /* Mobile planning overflow fix */
  .planning-wrap {
    overflow: auto !important;
  }

  .slide-planning {
    overflow-y: auto !important;
  }
}

/* =============================================
   PURCHASE CALENDAR EDITOR (pce-*) PREMIUM UI
   ============================================= */

#planningEditor {
  padding: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  border: none !important;
  box-shadow: 0 8px 40px rgba(23, 55, 45, 0.10);
}

.pce-header {
  background: #17372d;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.pce-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a9d35f;
  margin-bottom: 4px;
}

.pce-title {
  font-family: Manrope, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.pce-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pce-month-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pce-month-select {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  width: auto;
  margin-top: 0;
}

.pce-month-select option {
  color: #17231f;
  background: #fff;
}

.pce-btn {
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.12s;
}

.pce-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.pce-save {
  background: #a9d35f;
  color: #17372d;
}

.pce-excel {
  background: #1e7e34;
  color: #fff;
}

.pce-pdf {
  background: #c0392b;
  color: #fff;
}

.pce-wrap {
  background: #f5f8f5;
  padding: 20px;
  overflow-x: auto;
}

.pce-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  table-layout: fixed;
}

.pce-th {
  background: #17372d;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 4px;
  text-align: center;
  border-radius: 8px;
  letter-spacing: 0.04em;
}

.pce-day {
  background: #fff;
  border: 1.5px solid #dce8de;
  border-radius: 12px;
  padding: 8px 6px 10px;
  vertical-align: top;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 80px;
}

.pce-day:hover {
  border-color: #4f8c3a;
  box-shadow: 0 4px 16px rgba(79, 140, 58, 0.13);
}

.pce-day:focus-within {
  border-color: #4f8c3a;
  box-shadow: 0 0 0 3px rgba(79, 140, 58, 0.18);
}

.pce-today {
  border-color: #a9d35f !important;
  background: #f2faec !important;
}

.pce-empty {
  background: #edf1ed;
  border-radius: 10px;
  opacity: 0.4;
  min-height: 80px;
}

.pce-day-label {
  font-size: 13px;
  font-weight: 800;
  color: #17372d;
  margin-bottom: 6px;
  line-height: 1;
}

.pce-today .pce-day-label {
  color: #4f8c3a;
}

.pce-input {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  font-family: Manrope, sans-serif !important;
  color: #17372d !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pce-input::-webkit-outer-spin-button,
.pce-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.pce-input::placeholder {
  color: #c8d5ca;
  font-size: 18px;
}

@media screen and (max-width: 768px) {
  .pce-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .pce-title {
    font-size: 20px;
  }

  .pce-toolbar {
    width: 100%;
  }

  .pce-wrap {
    padding: 10px;
  }

  .pce-table {
    border-spacing: 3px;
  }

  .pce-day {
    min-height: 54px;
    padding: 4px 3px 6px;
    border-radius: 8px;
  }

  .pce-day-label {
    font-size: 10px;
  }

  .pce-input {
    font-size: 16px !important;
  }

  .pce-th {
    font-size: 10px;
    padding: 6px 2px;
  }

  .pce-btn {
    font-size: 11px;
    padding: 7px 10px;
  }
}


/* ── Admin list download bar ─────────────────────────────── */
.admin-dl-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f2f7f2;
  border-radius: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-dl-label {
  font-size: 13px;
  font-weight: 700;
  color: #17372d;
  flex: 1;
}

.admin-dl-btn {
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.admin-dl-btn:hover {
  opacity: 0.84;
  transform: translateY(-1px);
}

.admin-dl-excel {
  background: #1e7e34;
  color: #fff;
}

.admin-dl-pdf {
  background: #c0392b;
  color: #fff;
}

/* ── Production editor responsive grids ─────────────────── */
.prod-daily-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.prod-export-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  align-items: flex-end;
}

.prod-alldate-row {
  display: flex;
  align-items: center;
  height: 38px;
  gap: 8px;
}

.prod-export-btns {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.prod-dl-btn {
  flex: 1;
  min-width: 140px;
  text-align: center;
}

/* ── planningEditor on mobile ────────────────────────────── */
@media screen and (max-width: 640px) {

  .prod-daily-grid,
  .prod-export-grid {
    grid-template-columns: 1fr !important;
  }

  .prod-alldate-row {
    height: auto;
  }

  .prod-dl-btn {
    min-width: 0;
    width: 100%;
  }

  .prod-export-btns {
    flex-direction: column;
  }

  #planningEditor h2 {
    font-size: 20px !important;
  }

  .admin-editor-section {
    padding: 12px !important;
  }
}

/* =============================================
   MULTI-PAGE AND NAV NAVIGATION STYLES
   ============================================= */

.nav-menu {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 18px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.nav-btn:hover {
  color: var(--green);
  background: var(--mint);
  border-color: rgba(79, 140, 58, 0.1);
}

.nav-btn.active {
  color: var(--green);
  background: var(--mint);
  border-color: rgba(79, 140, 58, 0.22);
  box-shadow: 0 4px 12px rgba(79, 140, 58, 0.08);
}

.page-container {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  background: #edf1ed;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-container.hidden {
  display: none !important;
}

/* =============================================
   HOME PAGE HERO & BRAND CARD STYLES
   ============================================= */

.hero-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #17372d 0%, #2c5949 100%);
  color: #fff;
}

.hero-card {
  max-width: 800px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.35);
}

.hero-logo-container {
  background: #fff;
  border-radius: 20px;
  padding: 25px 35px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.22s ease;
  max-width: 90%;
}

.hero-logo-container:hover {
  transform: scale(1.02);
}

.hero-logo {
  width: 240px;
  height: auto;
  max-height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.hero-company-name {
  font-family: Manrope, sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #17372d;
  margin: 15px 0 8px;
}

.hero-access-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--mint);
  border: 1.5px solid var(--green);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.75;
  color: #b5cebf;
  margin: 0;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   PORTALS & SEARCH STYLES
   ============================================= */

.portals-section {
  padding: 60px 4vw 80px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: Manrope, sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #17372d;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #dce8de;
  border-radius: 12px;
  padding: 4px 6px 4px 16px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(23, 55, 45, 0.05);
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(79, 140, 58, 0.15);
}

.search-icon {
  font-size: 16px;
  color: var(--muted);
  margin-right: 12px;
}

.search-box input {
  border: none !important;
  outline: none !important;
  font-size: 15px !important;
  width: 100% !important;
  padding: 8px 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.search-btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 9px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-btn:hover {
  opacity: 0.9;
}

/* Portals Directory Table styling */
.portals-table {
  width: 100%;
  border-collapse: collapse;
}

.portals-table th {
  background: #17372d;
  color: #fff;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  padding: 16px 20px;
  border: none;
}

.portals-table td {
  padding: 16px 20px;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  border-top: none;
  border-left: none;
  border-right: none;
  background: #fff;
  font-weight: 600;
}

.portals-table tbody tr:hover td {
  background: #f7faf7;
}

.portals-table tbody tr:last-child td {
  border-bottom: none;
}

.portal-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.portal-status.active {
  background: #e6f3de;
  color: #39742b;
}

.portal-status.setup {
  background: #e1f5fe;
  color: #0288d1;
}

.portal-status.maintenance {
  background: #fff3e0;
  color: #f57c00;
}

.portal-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.portal-link:hover {
  opacity: 0.8;
}

.portal-link.disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

/* =============================================
   ABOUT & CONTACT PAGE COMPONENT STYLES
   ============================================= */

.content-card {
  max-width: 900px;
  margin: 60px auto;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
}

.content-card h1 {
  font-family: Manrope, sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: #17372d;
  margin-top: 8px;
  margin-bottom: 20px;
}

.content-card p {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 30px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.about-item {
  background: #fbfcfa;
  border: 1.5px solid #dce8de;
  border-radius: 16px;
  padding: 24px;
}

.about-item h3 {
  font-family: Manrope, sans-serif;
  font-size: 17.5px;
  font-weight: 800;
  color: #17372d;
  margin-bottom: 10px;
}

.about-item p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: var(--muted);
}

/* Contact Page Structure */
.contact-section {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
}

.contact-info-card {
  background: #17372d;
  color: #fff;
  padding: 50px;
  display: flex;
  flex-direction: column;
}

.contact-info-card h1 {
  font-family: Manrope, sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  margin: 10px 0 20px;
}

.contact-info-card p {
  color: #a4c5b6;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-detail-item strong {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lime);
}

.contact-detail-item span {
  font-size: 14.5px;
  line-height: 1.55;
  color: #e4ece8;
}

.contact-form-card {
  padding: 50px;
}

.contact-form-card h2 {
  font-family: Manrope, sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #17372d;
  margin-bottom: 25px;
}

.contact-form-card form {
  display: grid;
  gap: 20px;
}

/* =============================================
   LOGIN PAGE / AUTH PANEL STYLES
   ============================================= */

.new-order-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: #edf1ed;
  flex: 1;
}

.order-wrapper-card {
  max-width: 540px;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 15px 45px rgba(23, 55, 45, 0.08);
  border: 1px solid var(--line);
}

.order-logo-header {
  text-align: center;
  margin-bottom: 30px;
}

.order-logo {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
}

.order-logo-header h2 {
  font-family: Manrope, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #17372d;
  margin-bottom: 8px;
}

.order-logo-header p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

.order-wrapper-card form {
  display: grid;
  gap: 20px;
}

.login-page-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: #edf1ed;
  flex: 1;
}

.login-wrapper-card {
  max-width: 480px;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 15px 45px rgba(23, 55, 45, 0.08);
  border: 1px solid var(--line);
}

.login-logo-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
}

.login-logo-header h2 {
  font-family: Manrope, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #17372d;
  margin-bottom: 8px;
}

.login-logo-header p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

.login-wrapper-card form {
  display: grid;
  gap: 20px;
}


/* ================= FOOTER ================= */

.footer {
    background: #0f172a !important;
    color: #ffffff !important;
    margin-top: auto !important;
    width: 100% !important;
}

.footer-container {
    max-width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 40px !important;
    padding: 40px 1.5rem !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
}

.footer-logo {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    width: 180px !important;
    height: auto !important;
    max-width: 180px !important;
    object-fit: contain !important;
    margin-bottom: 15px !important;
    display: block !important;
}

.footer-left {
    flex: 1 !important;
    min-width: 250px !important;
    max-width: none !important;
}

.footer-left p {
    font-size: 14px !important;
    color: #ffffff !important;
    line-height: 1.5 !important;
    margin-top: 0 !important;
}

.footer-center {
    flex: 1 !important;
    min-width: 200px !important;
    max-width: none !important;
}

.footer-right {
    flex: 1 !important;
    min-width: 250px !important;
    max-width: none !important;
}

.footer h3 {
    margin-bottom: 15px !important;
    color: #10b981 !important;
    font-size: 1.17em !important; 
    font-weight: bold !important;
}

.footer a,
.footer .nav-btn {
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin-bottom: 10px !important;
    font-size: 14px !important;
    font-weight: normal !important;
    font-family: inherit !important;
    text-align: left !important;
    transition: color 0.2s ease !important;
}

.footer a:hover,
.footer .nav-btn:hover {
    color: #10b981 !important;
    background: transparent !important;
}

.footer-right p {
    color: #ffffff !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
}

.footer-bottom {
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 15px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    width: 100% !important;
}

/* ---- FOOTER MOBILE ---- */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column !important;
        text-align: center !important;
        padding: 30px 20px !important;
        gap: 24px !important;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        min-width: unset !important;
        width: 100% !important;
        text-align: center !important;
    }

    .footer-logo {
        margin: 0 auto 15px auto !important;
    }

    .footer-center .nav-btn,
    .footer a {
        text-align: center !important;
    }

    .footer-left p {
        font-size: 14px !important;
        color: #ffffff !important;
    }

    .footer-bottom {
        font-size: 14px !important;
        padding: 15px !important;
    }
} 
/* =============================================
   RESPONSIVE ADJUSTMENTS FOR NEW SCREENS
   ============================================= */

@media screen and (max-width: 768px) {
  /* HEADER RESPONSIVE REFINEMENT */
  .topbar {
    height: auto !important;
    padding: 15px 10px !important;
    flex-direction: column !important;
    gap: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  }
  
  .brand {
    width: 100% !important;
    justify-content: center !important;
  }
  
  .brand img {
    width: 100px !important;
    height: auto !important;
  }

  .nav-menu {
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-left: 0 !important;
    order: 2 !important;
  }

  .nav-btn {
    font-size: 11.5px !important;
    padding: 6px 12px !important;
    border-radius: 14px !important;
  }

  .topbar-right {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 5px !important;
    order: 3 !important;
  }

  .topbar-controls {
    margin-right: 0 !important;
  }

  .clock {
    text-align: center !important;
  }

  /* HERO & LOGIN SCREEN RESPONSIVE REFINEMENT */
  .hero-section {
    padding: 40px 15px !important;
  }

  .hero-card {
    padding: 24px 15px !important;
    border-radius: 16px !important;
  }

  .hero-logo-container {
    padding: 15px 20px !important;
    margin-bottom: 15px !important;
    border-radius: 12px !important;
  }

  .hero-logo {
    width: 150px !important;
  }

  .hero-company-name {
    font-size: 19px !important;
    margin-top: 10px !important;
  }

  .hero-access-badge {
    font-size: 10px !important;
    padding: 4px 10px !important;
  }

  .hero-desc {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
  }

  .new-order-section {
    padding: 40px 15px !important;
  }

  .order-wrapper-card {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }

  .order-logo {
    width: 110px !important;
    margin-bottom: 15px !important;
  }

  .order-logo-header h2 {
    font-size: 19px !important;
  }

  .order-logo-header p {
    font-size: 12px !important;
  }

  .login-page-section {
    padding: 40px 15px !important;
  }

  .login-wrapper-card {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }

  .login-logo {
    width: 110px !important;
    margin-bottom: 15px !important;
  }

  .login-logo-header h2 {
    font-size: 19px !important;
  }

  .login-logo-header p {
    font-size: 12px !important;
  }

  /* ABOUT & CONTACT SECTION RESPONSIVE */
  .content-card {
    margin: 30px 15px !important;
    padding: 20px !important;
    border-radius: 16px !important;
  }

  .content-card h1 {
    font-size: 26px !important;
  }

  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .about-item {
    padding: 16px !important;
  }

  .contact-section {
    margin: 30px 0 !important;
    padding: 0 15px !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
    border-radius: 16px !important;
  }

  .contact-info-card, .contact-form-card {
    padding: 30px 20px !important;
  }

  .contact-info-card h1 {
    font-size: 26px !important;
  }

  /* PORTALS DIRECTORY TABLE RESPONSIVE */
  .portals-table th, .portals-table td {
    padding: 12px 10px !important;
    font-size: 12px !important;
  }

  /* CUSTOM FOOTER RESPONSIVE OVERRIDES */
  .footer {
    margin-top: auto !important;
  }

  .footer-container {
    flex-direction: column !important;
    gap: 35px !important;
    text-align: center !important;
    padding-bottom: 30px !important;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    align-items: center !important;
    text-align: center !important;
  }

  .footer-left p {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .footer-logo {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .footer-center h3,
  .footer-right h3 {
    margin-bottom: 12px !important;
  }

  .footer-center .nav-btn,
  .footer a {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 8px !important;
  }

  .footer-bottom {
    padding: 15px !important;
    font-size: 14px !important;
  }
}

/* Calibration Tracker Switch Styles */
#switch-projects-btn,
#switch-calibration-btn,
#switch-delayed-btn {
  background: #e7ece8;
  color: var(--deep);
  border: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
}
#switch-projects-btn.active,
#switch-calibration-btn.active,
#switch-delayed-btn.active {
  background: var(--lime);
  color: var(--deep);
  border-color: var(--lime);
}

/* Management Delayed Cases Styling */
tr.row-red-delay {
  background-color: #fce4e4 !important; /* Soft premium light red */
  color: #c0392b !important; /* Premium dark red text */
}
tr.row-red-delay:hover {
  background-color: #f9d5d5 !important;
}
tr.row-red-delay td {
  border-color: #f5c2c2 !important;
}
/* WhatsApp Floating Widget */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  cursor: pointer;
  transition: all 0.3s ease;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

/* ── Mobile Header Clock ── */
@media (max-width: 768px) {
  .topbar-clock-date {
    display: none !important;
  }
  .topbar-clock-time {
    font-size: 12px !important;
  }
  .topbar-clock-wrap {
    min-width: 60px !important;
    padding-left: 6px !important;
  }
}

@media (max-width: 480px) {
  .topbar-clock-wrap {
    display: none !important;
  }
}

/* ── Laptop / Tablet Overlap Prevention (768px to 1050px) ── */
@media (max-width: 1050px) and (min-width: 768px) {
  .topbar {
    height: 84px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 15px !important;
  }
  .brand {
    gap: 8px !important;
    align-items: center !important;
  }
  .brand img {
    width: 90px !important;
    height: 38px !important;
    object-fit: contain !important;
  }
  .topbar-headline-wrap {
    font-size: 16px !important;
    letter-spacing: 0.05em !important;
  }
  .badge-i40 {
    font-size: 9px !important;
    padding: 2px 6px !important;
    margin-left: 4px !important;
  }
  .topbar-right-group {
    gap: 8px !important;
  }
  .topbar-clock-wrap {
    display: none !important; /* Hide clock to save space on tablets */
  }
}

/* ── Mobile Viewports (max-width: 768px) ── */
@media (max-width: 768px) {
  .topbar {
    height: auto !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px 10px !important;
    gap: 8px !important;
  }
  .brand {
    width: 100% !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .brand img {
    width: 100px !important;
    height: 42px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }
  .brand div {
    display: none !important; /* Hide small subtitle division borders */
  }
  .topbar-left {
    width: 100% !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .topbar-headline-wrap {
    font-size: 18px !important;
    letter-spacing: 0.05em !important;
    justify-content: center !important;
    width: 100% !important;
  }
  .badge-i40 {
    font-size: 10px !important;
    padding: 2px 6px !important;
    margin-left: 4px !important;
  }
  .topbar-right-group {
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .nav-menu {
    width: 100% !important;
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 6px 12px !important;
  }
  .nav-menu::-webkit-scrollbar {
    display: none !important;
  }
  .nav-btn {
    flex: 0 0 auto !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
  .topbar-clock-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 2px !important;
  }

  .admin-tabs {
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
  }
  .admin-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .admin-tabs button {
    flex: 0 0 auto !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
  }

  #deptLogsForm .editor-title {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  #deptLogsForm .editor-title div {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .dept-editor-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .dept-editor-header label {
    justify-content: space-between !important;
    width: 100% !important;
  }
  .dept-editor-header button {
    width: 100% !important;
  }

  .dept-log-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .dept-log-row strong {
    width: 100% !important;
    margin-bottom: 2px !important;
    font-size: 14.5px !important;
  }
  .dept-log-row label {
    width: 100% !important;
    flex: none !important;
    margin: 0 !important;
  }
  .dept-log-row label input {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .dept-log-row button {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 5px !important;
  }

  .dept-export-controls {
    padding: 12px !important;
  }
  .dept-export-controls .export-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .dept-export-controls button {
    width: 100% !important;
  }

  /* Mobile Home page alignment overrides */
  .home-page-container {
    padding: 20px 15px !important;
    min-height: 60vh !important;
  }
  .home-welcome-card {
    padding: 30px 20px !important;
    border-radius: 16px !important;
  }
  .portal-logins-bar {
    flex-direction: column !important;
    width: 100% !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .portal-logins-bar button {
    width: 100% !important;
    padding: 12px !important;
    font-size: 14px !important;
  }
}

/* ── Base Home Page Classes ── */
.home-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  color: var(--deep);
  padding: 40px;
}
.home-welcome-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 50px 60px;
  border-radius: 24px;
  border: 1.5px solid var(--line);
  box-shadow: 0 20px 50px rgba(23, 55, 45, 0.08);
  max-width: 680px;
  backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
}

/* ── Custom fixes for Navbar and Table alignment ── */
/* Keep the topbar headline visible but scale it down on smaller screens to prevent overlap */
.topbar-headline-wrap {
  transition: font-size 0.2s, letter-spacing 0.2s;
}

@media (max-width: 1350px) {
  .topbar-headline-wrap {
    font-size: 18px !important;
  }
}

@media (max-width: 1100px) {
  .topbar-headline-wrap {
    font-size: 16px !important;
  }
}

@media (max-width: 768px) {
  .topbar-headline-wrap {
    display: flex !important;
    font-size: 15px !important;
  }
}

@media (max-width: 480px) {
  .topbar-headline-wrap {
    display: flex !important;
    font-size: 14px !important;
  }
}

/* Daily Department Performance Table custom styles */
.dept-perf-wrap {
  width: 100% !important;
  overflow-x: hidden !important; /* Hide horizontal scrollbar since it fits fully */
}

.table-wrap table.dept-perf-table {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.table-wrap table.dept-perf-table th,
.table-wrap table.dept-perf-table td {
  white-space: normal !important;
  word-break: break-word !important;
  font-size: 14px !important;
  padding: 12px 10px !important;
  vertical-align: top !important;
}

/* Column widths distribution */
.table-wrap table.dept-perf-table th:nth-child(1),
.table-wrap table.dept-perf-table td:nth-child(1) {
  width: 18% !important;
  min-width: 110px !important;
}

.table-wrap table.dept-perf-table th:nth-child(2),
.table-wrap table.dept-perf-table td:nth-child(2) {
  width: 58% !important;
}

.table-wrap table.dept-perf-table th:nth-child(3),
.table-wrap table.dept-perf-table td:nth-child(3) {
  width: 24% !important;
  min-width: 130px !important;
}

@media (max-width: 768px) {
  .table-wrap table.dept-perf-table th,
  .table-wrap table.dept-perf-table td {
    font-size: 12px !important;
    padding: 8px 6px !important;
  }
  .table-wrap table.dept-perf-table th:nth-child(1),
  .table-wrap table.dept-perf-table td:nth-child(1) {
    width: 22% !important;
    min-width: 80px !important;
  }
  .table-wrap table.dept-perf-table th:nth-child(2),
  .table-wrap table.dept-perf-table td:nth-child(2) {
    width: 50% !important;
  }
  .table-wrap table.dept-perf-table th:nth-child(3),
  .table-wrap table.dept-perf-table td:nth-child(3) {
    width: 28% !important;
    min-width: 100px !important;
  }
}

/* Pricing Section Styles */
.pricing-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  align-items: stretch;
  margin-top: 20px;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(23, 55, 45, 0.04);
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(23, 55, 45, 0.08);
  border-color: var(--green);
}

.pricing-card.recommended {
  border: 2px solid var(--green);
  box-shadow: 0 20px 40px rgba(23, 55, 45, 0.1);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 15px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(79, 140, 58, 0.25);
}

.pricing-card-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
}

.plan-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--deep);
  font-family: 'Manrope', sans-serif;
  margin-bottom: 10px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  margin-bottom: 8px;
}

.currency {
  font-size: 24px;
  font-weight: 700;
  color: var(--deep);
}

.price-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--deep);
  line-height: 1;
}

.price-period {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.activation-fee {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  background: var(--mint);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.plan-features li {
  font-size: 13.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.plan-features li::before {
  content: none !important;
}

.feat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  margin-right: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.feat-icon.check {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.feat-icon.lock {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid rgba(198, 40, 40, 0.2);
}

.feat-unlocked {
  color: var(--deep) !important;
  font-weight: bold;
}

.feat-locked {
  color: var(--muted) !important;
  opacity: 0.65;
  text-decoration: line-through;
}

.pricing-checkout-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--deep);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Manrope', sans-serif;
}

.pricing-checkout-btn:hover {
  background: var(--mint);
  border-color: var(--green);
  color: var(--deep);
}

.pricing-checkout-btn.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 6px 15px rgba(79, 140, 58, 0.2);
}

.pricing-checkout-btn.primary:hover {
  background: var(--deep);
  border-color: var(--deep);
  box-shadow: 0 6px 15px rgba(23, 55, 45, 0.2);
}

/* Payment Modal Overlay Styles */
.payment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 42, 34, 0.6);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.payment-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.payment-modal-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.payment-modal-overlay.active .payment-modal-card {
  transform: translateY(0);
}

.payment-modal-header {
  padding: 18px 24px;
  background: var(--mint);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.payment-modal-logo {
  height: 32px;
}

.payment-modal-header .close-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}

.payment-modal-header .close-btn:hover {
  color: var(--danger);
}

.payment-modal-body {
  padding: 24px;
}

.payment-summary {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 8px;
  column-gap: 15px;
  margin-bottom: 15px;
}

.summary-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.summary-value {
  font-size: 13.5px;
  color: var(--deep);
  text-align: right;
}

/* Department Logs Mobile Alignment */
@media (max-width: 768px) {
  #page-admin-dashboard,
  #page-admin-boq {
    padding: 8px !important;
  }
  #page-admin-dashboard > div,
  #page-admin-boq > div {
    min-height: calc(100vh - 16px) !important;
    border-radius: 12px !important;
  }
  .admin-toolbar {
    padding: 12px 15px !important;
  }
  .admin-content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }
  .editor {
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .dept-editor-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
  }
  .dept-editor-header label {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    font-size: 12.5px !important;
  }
  .dept-editor-header label input {
    width: 100% !important;
  }
  .dept-editor-header button {
    width: 100% !important;
  }
  .dept-log-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
  }
  .dept-log-row strong {
    width: 100% !important;
    border-bottom: 1.5px solid var(--line);
    padding-bottom: 6px;
    margin-bottom: 5px;
    font-size: 13px !important;
  }
  .dept-log-row label {
    width: 100% !important;
    margin: 0 !important;
    font-size: 11.5px !important;
  }
  .dept-log-row label input {
    height: 34px !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
  .dept-export-controls {
    padding: 12px !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    gap: 10px !important;
  }
  .dept-export-controls h4 {
    font-size: 12px !important;
  }
  .dept-export-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .dept-export-row label {
    width: 100% !important;
    margin: 0 !important;
    font-size: 11.5px !important;
  }
  .dept-export-row label input {
    width: 100% !important;
    box-sizing: border-box !important;
    height: 34px !important;
    font-size: 12px !important;
  }
  
  /* Expose explicit height, color, and centering on mobile for all department logs buttons */
  .dept-editor-header button,
  .dept-export-controls button,
  .dept-export-row button {
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    color: var(--deep) !important;
    background-color: var(--lime) !important;
    font-weight: 800 !important;
    border-radius: 9px !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
  
  #deleteDeptLogsBtn {
    background-color: #fdf0ef !important;
    color: #d9534f !important;
    border: 1.5px solid #d9534f !important;
  }

  /* Engineering Users section mobile responsiveness */
  #engUsersSection {
    margin-top: 20px !important;
    padding-top: 20px !important;
  }
  #engUsersSection > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
  #engUsersSection > div > div {
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
  }
  
  /* Swap order: Place form wrapper at the top (order: 1) and list wrapper below it (order: 2) */
  #engUsersFormWrapper {
    order: 1 !important;
  }
  #engUsersListWrapper {
    order: 2 !important;
  }
}

/* Billing Toggler Styles */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--line);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--line);
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider-toggle {
  background-color: var(--green);
  border-color: var(--green);
}

input:focus + .slider-toggle {
  box-shadow: 0 0 1px var(--green);
}

input:checked + .slider-toggle:before {
  transform: translateX(24px);
}

.toggle-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.toggle-label.active {
  color: var(--deep);
}

/* Compact Table Styles - Global for both BOQ tables */
#eng-boq-table,
#admin-boq-table {
  font-size: 10px !important;
}

#eng-boq-table thead th,
#admin-boq-table thead th {
  font-size: 9px !important;
  padding: 4px 3px !important;
  line-height: 1.15 !important;
}

#eng-boq-table tbody td,
#admin-boq-table tbody td {
  padding: 3px 2px !important;
}

#eng-boq-table tbody input,
#eng-boq-table tbody select,
#admin-boq-table tbody input,
#admin-boq-table tbody select {
  font-size: 9.5px !important;
  padding: 2px 4px !important;
  height: 24px !important;
  border-radius: 4px !important;
}

/* Fullscreen Table Styles */
.table-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 99999 !important;
  background: #fff !important;
  padding: 20px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  overflow: auto !important;
}

/* Sticky headers ONLY in fullscreen mode */
.table-fullscreen thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.fullscreen-exit-btn {
  display: none;
  position: fixed;
  top: 15px;
  right: 25px;
  z-index: 100000;
  padding: 8px 16px;
  background: linear-gradient(135deg, #dc3545, #bd2130);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
  font-size: 12px;
  transition: transform 0.1s ease;
}

.fullscreen-exit-btn:hover {
  transform: scale(1.05);
}

.table-fullscreen + .fullscreen-exit-btn {
  display: block;
}

.cell-edited {
  background-color: #efe0d0 !important;
}

/* Modal Overlay & Content Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
  background: #ffffff;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  transform: translateY(20px);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border: none;
}

.modal-header {
  padding: 16px 24px;
  background: #17372d;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 4px;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #f8fafc;
  flex: 1;
}

.modal-pie-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.modal-chart-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.modal-chart-card h3 {
  margin: 0 0 16px 0;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.modal-chart-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  display: flex;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .modal-pie-container {
    grid-template-columns: 1fr !important;
  }
}