/*
|--------------------------------------------------------------------------
| Global reset and theme
|--------------------------------------------------------------------------
*/

* {
  box-sizing: border-box;
}

:root {
  --hazgen-orange: #f58220;
  --hazgen-dark-orange: #d96d0d;

  --hazgen-green: #168447;
  --hazgen-red: #b73b3b;
  --hazgen-dark-red: #8f2c2c;

  --hazgen-grey: #555555;
  --hazgen-dark-grey: #2b2b2b;
  --hazgen-light-grey: #f4f4f4;

  --hazgen-sidebar: #2f2f2f;
  --hazgen-white: #ffffff;

  --hazgen-border: #dedede;
  --hazgen-muted: #666666;
  --hazgen-background: #f5f5f5;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;

  background: var(--hazgen-background);
  color: #222222;

  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

/*
|--------------------------------------------------------------------------
| Login page
|--------------------------------------------------------------------------
*/

.login-body {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 20px;

  background:
    linear-gradient(
      135deg,
      var(--hazgen-orange),
      var(--hazgen-dark-grey)
    );
}

.login-card {
  width: 100%;
  max-width: 380px;

  padding: 30px;

  border-radius: 16px;

  background: var(--hazgen-white);

  box-shadow:
    0 20px 50px
    rgba(0, 0, 0, 0.25);
}

.brand,
.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border-radius: 12px;

  background: var(--hazgen-orange);
  color: var(--hazgen-white);

  font-weight: bold;
}

.login-card h1 {
  margin: 0;

  color: var(--hazgen-orange);
}

.login-card p {
  margin-top: 4px;

  color: var(--hazgen-muted);
}

.login-card button {
  width: 100%;

  margin-top: 20px;
}

.hint {
  font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| Form controls
|--------------------------------------------------------------------------
*/

label {
  display: block;

  margin-top: 15px;

  color: var(--hazgen-dark-grey);

  font-weight: bold;
}

input,
select,
textarea {
  width: 100%;

  margin-top: 6px;
  padding: 11px;

  border: 1px solid #cccccc;
  border-radius: 8px;

  background: var(--hazgen-white);
  color: #222222;

  font-family: inherit;
  font-size: 14px;
}

textarea {
  min-height: 100px;

  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;

  border-color: var(--hazgen-orange);

  box-shadow:
    0 0 0 3px
    rgba(245, 130, 32, 0.18);
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;

  background: #eeeeee;
  color: #777777;
}

/*
|--------------------------------------------------------------------------
| Buttons and links
|--------------------------------------------------------------------------
*/

button,
.actions a,
.btn-link {
  display: inline-block;

  padding: 11px 16px;

  border: none;
  border-radius: 8px;

  cursor: pointer;

  background: var(--hazgen-orange);
  color: var(--hazgen-white);

  text-decoration: none;
  font-family: inherit;
  font-weight: bold;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

button:hover,
.actions a:hover,
.btn-link:hover {
  background: var(--hazgen-dark-orange);
}

button:active,
.actions a:active,
.btn-link:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;

  opacity: 0.55;
}

.danger-btn {
  background: var(--hazgen-red);
}

.danger-btn:hover {
  background: var(--hazgen-dark-red);
}

/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.sidebar {
  position: fixed;
  top: 0;
  left: 0;

  width: 250px;
  height: 100vh;

  display: flex;
  flex-direction: column;

  padding: 22px;

  overflow: hidden;

  background: var(--hazgen-sidebar);
  color: var(--hazgen-white);
}

.sidebar h2 {
  margin: 0;

  color: var(--hazgen-orange);
}

.sidebar small {
  color: #d6d6d6;
}

.sidebar-user {
  margin-top: 18px;
  padding: 12px !important;

  border-radius: 9px;

  background:
    rgba(255, 255, 255, 0.06);
}

.sidebar nav {
  flex: 1;

  display: grid;
  align-content: start;
  gap: 8px;

  margin-top: 22px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
}

.sidebar nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar nav::-webkit-scrollbar-thumb {
  border-radius: 10px;

  background:
    rgba(255, 255, 255, 0.25);
}

.sidebar nav a,
.sidebar nav button {
  width: 100%;

  padding: 12px;

  border-radius: 8px;

  background: transparent;
  color: var(--hazgen-white);

  text-align: left;
  text-decoration: none;
}

.sidebar nav a.active,
.sidebar nav a:hover,
.sidebar nav button:hover {
  background: var(--hazgen-orange);
}

.sidebar nav button {
  border:
    1px solid
    rgba(255, 255, 255, 0.2);
}

.sidebar-footer {
  margin-top: 15px;
  padding-top: 18px;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.1);
}

.logout-btn {
  width: 100%;

  padding: 12px;

  border: none;
  border-radius: 8px;

  cursor: pointer;

  background: #d32f2f;
  color: var(--hazgen-white);

  font-weight: bold;
}

.logout-btn:hover {
  background: #b71c1c;
}

/*
|--------------------------------------------------------------------------
| Main layout
|--------------------------------------------------------------------------
*/

.main {
  min-height: 100vh;

  margin-left: 250px;
  padding: 30px;
}

#pageContent {
  width: 100%;
}

.page-header {
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 0;

  color: var(--hazgen-orange);
}

.page-header p {
  margin-bottom: 0;

  color: var(--hazgen-muted);
  line-height: 1.5;
}

/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.cards {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 18px;

  margin-bottom: 22px;
}

.card {
  min-width: 0;

  padding: 22px;

  border-radius: 16px;

  color: var(--hazgen-white);

  box-shadow:
    0 12px 30px
    rgba(0, 0, 0, 0.1);
}

.card span {
  display: block;

  opacity: 0.9;
}

.card strong {
  display: block;

  margin-top: 12px;

  font-size: 26px;
}

.green {
  background:
    linear-gradient(
      135deg,
      #f58220,
      #d96d0d
    );
}

.red {
  background:
    linear-gradient(
      135deg,
      #b73b3b,
      #7d2323
    );
}

.blue {
  background:
    linear-gradient(
      135deg,
      #555555,
      #2b2b2b
    );
}

.orange {
  background:
    linear-gradient(
      135deg,
      #f58220,
      #bd7a1a
    );
}

/*
|--------------------------------------------------------------------------
| Grid layouts
|--------------------------------------------------------------------------
*/

.grid-2 {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}

.form-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 12px;
}

.form-grid button {
  align-self: end;
}

/*
|--------------------------------------------------------------------------
| Panels
|--------------------------------------------------------------------------
*/

.panel {
  margin-bottom: 20px;
  padding: 22px;

  border-top:
    4px solid
    var(--hazgen-orange);
  border-radius: 16px;

  background: var(--hazgen-white);

  box-shadow:
    0 10px 25px
    rgba(0, 0, 0, 0.06);
}

.panel h2 {
  margin-top: 0;

  color: var(--hazgen-orange);
}

/*
|--------------------------------------------------------------------------
| Tables
|--------------------------------------------------------------------------
*/

.table-wrap,
.scroll-table {
  width: 100%;

  overflow-x: auto;
}

.scroll-table {
  max-height: 520px;

  overflow-y: auto;

  border: 1px solid #dddddd;
  border-radius: 10px;
}

table {
  width: 100%;

  border-collapse: collapse;

  overflow: hidden;

  border-radius: 12px;

  background: var(--hazgen-white);
}

th,
td {
  padding: 10px;

  border-bottom:
    1px solid
    #e3e3e3;

  vertical-align: top;
}

th {
  background: var(--hazgen-orange);
  color: var(--hazgen-white);

  text-align: left;
}

td {
  color: #333333;
}

tr:nth-child(even) td {
  background: #f7f7f7;
}

table button {
  padding: 7px 10px;

  font-size: 12px;
}

/*
|--------------------------------------------------------------------------
| Actions and totals
|--------------------------------------------------------------------------
*/

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.totals {
  margin: 18px 0;

  color: var(--hazgen-dark-grey);

  text-align: right;
  font-size: 18px;
}

/*
|--------------------------------------------------------------------------
| Customer statement invoice services
|--------------------------------------------------------------------------
*/

.invoice-summary-row {
  background: var(--hazgen-white);
}

.invoice-summary-row td {
  vertical-align: middle;
}

.invoice-services-row td {
  padding:
    0
    12px
    16px;

  background: #f7f9f8 !important;
}

.invoice-services {
  margin-top: 8px;
  padding: 14px;

  border-left:
    4px solid
    var(--hazgen-orange);
  border-radius: 8px;

  background: var(--hazgen-white);

  box-shadow:
    0 4px 14px
    rgba(0, 0, 0, 0.05);
}

.invoice-services-title {
  margin-bottom: 10px;

  color: var(--hazgen-dark-grey);

  font-size: 14px;
  font-weight: 700;
}

.invoice-services-table {
  width: 100%;

  border-collapse: collapse;

  background: var(--hazgen-white);
}

.invoice-services-table th,
.invoice-services-table td {
  padding: 9px 10px;

  border-bottom:
    1px solid
    #dfe5e1;

  text-align: left;
  font-size: 12px;
}

.invoice-services-table th {
  background: #eef3ef;
  color: var(--hazgen-dark-grey);
}

.invoice-services-table tr:nth-child(even) td {
  background: #fafafa;
}

.invoice-services-table td:nth-child(3),
.invoice-services-table td:nth-child(5),
.invoice-services-table td:nth-child(6) {
  text-align: right;
  white-space: nowrap;
}

.invoice-services-table td:nth-child(4) {
  white-space: nowrap;
}

.invoice-services-empty {
  margin-top: 8px;
  padding: 12px;

  border-radius: 7px;

  background: #f1f4f2;
  color: var(--hazgen-muted);

  font-size: 13px;
  font-style: italic;
}

/*
|--------------------------------------------------------------------------
| Status badges
|--------------------------------------------------------------------------
*/

.status-badge {
  display: inline-block;

  min-width: 105px;

  padding: 6px 10px;

  border-radius: 20px;

  color: var(--hazgen-white);

  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.status-paid {
  background: #168447;
}

.status-partial {
  background: #f59e0b;
}

.status-outstanding {
  background: #b73333;
}

/*
|--------------------------------------------------------------------------
| Idle-session warning
|--------------------------------------------------------------------------
*/

#hazgenIdleModal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background:
    rgba(0, 0, 0, 0.68);

  backdrop-filter: blur(4px);
}

.hazgen-idle-card {
  width: 100%;
  max-width: 440px;

  padding: 32px;

  border-top:
    5px solid
    var(--hazgen-orange);
  border-radius: 18px;

  background: var(--hazgen-white);
  color: #222222;

  text-align: center;

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.3);
}

.hazgen-idle-icon {
  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin:
    0 auto 18px;

  border-radius: 50%;

  background: #fff0df;
  color: var(--hazgen-orange);

  font-size: 36px;
  font-weight: 800;
}

.hazgen-idle-card h2 {
  margin:
    0 0 12px;

  color: #1d3d2b;

  font-size: 27px;
}

.hazgen-idle-card p {
  margin: 8px 0;

  color: var(--hazgen-grey);

  line-height: 1.6;
}

#hazgenIdleCountdown {
  color: #c34f00;

  font-size: 20px;
}

.hazgen-idle-actions {
  display: flex;
  gap: 12px;

  margin-top: 24px;
}

.hazgen-idle-actions button {
  flex: 1;

  padding: 12px 16px;

  border: none;
  border-radius: 9px;

  cursor: pointer;

  background: var(--hazgen-orange);
  color: var(--hazgen-white);

  font-weight: 700;
}

.hazgen-idle-actions button:hover {
  opacity: 0.9;
}

.hazgen-idle-actions
.hazgen-idle-logout {
  background: #8d1c1c;
}

/*
|--------------------------------------------------------------------------
| Responsive design
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {
  .cards {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;

    width: 100%;
    height: auto;

    padding: 18px;
  }

  .sidebar nav {
    max-height: none;

    overflow: visible;
  }

  .main {
    margin-left: 0;
    padding: 20px;
  }

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

  .invoice-services {
    overflow-x: auto;
  }

  .invoice-services-table {
    min-width: 700px;
  }
}

@media (max-width: 650px) {
  .main {
    padding: 14px;
  }

  .panel {
    padding: 16px;
    border-radius: 12px;
  }

  .page-header h1 {
    font-size: 25px;
  }

  .card {
    padding: 18px;
  }

  .card strong {
    font-size: 22px;
  }

  th,
  td {
    padding: 8px;

    font-size: 12px;
  }

  button,
  .actions a,
  .btn-link {
    width: 100%;

    text-align: center;
  }

  .actions {
    flex-direction: column;
  }

  .hazgen-idle-card {
    padding: 24px 18px;
  }

  .hazgen-idle-card h2 {
    font-size: 23px;
  }

  .hazgen-idle-actions {
    flex-direction: column;
  }
}

@media print {
  .sidebar,
  .sidebar-footer,
  .actions,
  button {
    display: none !important;
  }

  body {
    background: var(--hazgen-white);
  }

  .main {
    width: 100%;

    margin: 0;
    padding: 0;
  }

  .panel {
    box-shadow: none;

    break-inside: avoid;
  }

  .invoice-services,
  .invoice-services-row,
  .invoice-summary-row {
    break-inside: avoid;
  }
}

.expense-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.expense-filters > div {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.expense-filters label {
  font-weight: 600;
  margin-bottom: 6px;
}

.expense-filters input,
.expense-filters select {
  padding: 10px;
}

.expense-filters button {
  padding: 11px 18px;
}

.expense-summary {
  padding: 15px;
  margin-bottom: 15px;
  background: #f4f6f8;
  border-left: 4px solid #333;
  border-radius: 4px;
}

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

.expense-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.expense-filters > div {
  display: flex;
  flex-direction: column;
  min-width: 190px;
}

.expense-filters label {
  margin-bottom: 6px;
  font-weight: 600;
}

.expense-filters input,
.expense-filters select {
  width: 100%;
  padding: 10px;
}

.expense-filters button {
  padding: 11px 18px;
  margin-bottom: 0;
}

.expense-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.expense-summary-item {
  padding: 15px;
  background: #f4f6f8;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.expense-summary-item span {
  display: block;
  margin-bottom: 5px;
  color: #666;
  font-size: 13px;
}

.expense-summary-item strong {
  font-size: 17px;
}

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

.table-responsive table {
  width: 100%;
  min-width: 1700px;
  border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.expense-actions {
  display: flex;
  gap: 6px;
}

.budget-over {
  color: #c62828;
  font-weight: bold;
}

.budget-remaining {
  color: #2e7d32;
  font-weight: bold;
}

.budget-none {
  color: #777;
}

.status-paid {
  display: inline-block;
  padding: 5px 10px;
  color: #1b5e20;
  background: #e8f5e9;
  border-radius: 20px;
  font-weight: 600;
}

.status-outstanding {
  display: inline-block;
  padding: 5px 10px;
  color: #b71c1c;
  background: #ffebee;
  border-radius: 20px;
  font-weight: 600;
}

.empty-state {
  padding: 25px;
  text-align: center;
  background: #f7f7f7;
  border-radius: 8px;
}

/* Hazgen navigation logo */

.logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.sidebar-logo {
  display: block;
  width: 125px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px;
  object-fit: contain;
}

.logo-text h2 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.logo-text small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

@media screen and (max-width: 800px) {
  .sidebar-logo {
    width: 95px;
  }

  .logo-text h2 {
    font-size: 17px;
  }
}

/*
|--------------------------------------------------------------------------
| Hazgen Finance Corporate Theme
|--------------------------------------------------------------------------
*/

* {
  box-sizing: border-box;
}

:root {
  --hazgen-orange: #f58220;
  --hazgen-orange-dark: #d96d0d;
  --hazgen-orange-light: #fff4e9;

  --hazgen-green: #1f5b37;
  --hazgen-green-dark: #173f29;
  --hazgen-green-light: #eaf4ee;

  --hazgen-red: #b42318;
  --hazgen-red-dark: #8f1d14;
  --hazgen-red-light: #fff0ee;

  --hazgen-gold: #c88719;
  --hazgen-gold-light: #fff7e8;

  --hazgen-sidebar: #17231d;
  --hazgen-sidebar-light: #22342a;

  --hazgen-background: #f3f6f4;
  --hazgen-surface: #ffffff;
  --hazgen-surface-soft: #f8faf9;

  --hazgen-text: #253129;
  --hazgen-muted: #6d7871;
  --hazgen-border: #dde5e0;

  --hazgen-shadow:
    0 8px 28px rgba(30, 47, 38, 0.07);

  --hazgen-shadow-hover:
    0 14px 35px rgba(30, 47, 38, 0.12);

  --sidebar-width: 270px;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;

  background:
    linear-gradient(
      180deg,
      #f8faf9 0%,
      var(--hazgen-background) 100%
    );

  color: var(--hazgen-text);

  font-family:
    "Segoe UI",
    Arial,
    Helvetica,
    sans-serif;

  font-size: 14px;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

a {
  color: var(--hazgen-orange-dark);
}

a:hover {
  color: var(--hazgen-orange);
}

/*
|--------------------------------------------------------------------------
| Login page
|--------------------------------------------------------------------------
*/

.login-body {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 20px;

  background:
    radial-gradient(
      circle at top left,
      rgba(245, 130, 32, 0.25),
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #16221c 0%,
      #263a2f 55%,
      #111813 100%
    );
}

.login-card {
  width: 100%;
  max-width: 440px;

  padding: 38px;

  border-top:
    5px solid
    var(--hazgen-orange);

  border-radius: 18px;

  background:
    rgba(255, 255, 255, 0.98);

  box-shadow:
    0 28px 75px
    rgba(0, 0, 0, 0.34);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin-bottom: 28px;

  text-align: center;
}

.brand img {
  width: 170px;
  height: auto;

  margin-bottom: 16px;

  object-fit: contain;
}

.brand h1,
.login-card h1 {
  margin: 0;

  color: var(--hazgen-green-dark);

  font-size: 28px;
  font-weight: 750;
}

.brand p,
.login-card p {
  margin: 7px 0 0;

  color: var(--hazgen-muted);
}

.login-card button {
  width: 100%;
  margin-top: 22px;
}

.hint {
  font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| Form controls
|--------------------------------------------------------------------------
*/

label {
  display: block;

  margin-top: 15px;
  margin-bottom: 6px;

  color: #344139;

  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;

  margin: 0;
  padding: 11px 13px;

  border:
    1px solid
    #ccd6d0;

  border-radius: 9px;

  background: var(--hazgen-surface);
  color: var(--hazgen-text);

  font-family: inherit;
  font-size: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input,
select {
  min-height: 43px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #96a09a;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;

  border-color: var(--hazgen-orange);

  background: #ffffff;

  box-shadow:
    0 0 0 4px
    rgba(245, 130, 32, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
  cursor: not-allowed;

  background: #eef1ef;
  color: #777f7a;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
}

/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

button,
.actions a,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 41px;
  padding: 10px 17px;

  border: none;
  border-radius: 9px;

  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      var(--hazgen-orange),
      var(--hazgen-orange-dark)
    );

  color: #ffffff;

  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  box-shadow:
    0 6px 14px
    rgba(245, 130, 32, 0.18);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

button:hover,
.actions a:hover,
.btn-link:hover {
  color: #ffffff;

  box-shadow:
    0 9px 19px
    rgba(245, 130, 32, 0.27);

  transform: translateY(-1px);
}

button:active,
.actions a:active,
.btn-link:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.danger-btn {
  background:
    linear-gradient(
      135deg,
      var(--hazgen-red),
      var(--hazgen-red-dark)
    );

  box-shadow:
    0 6px 14px
    rgba(180, 35, 24, 0.17);
}

.danger-btn:hover {
  box-shadow:
    0 9px 19px
    rgba(180, 35, 24, 0.25);
}

.secondary-btn {
  border:
    1px solid
    var(--hazgen-border);

  background: var(--hazgen-surface);
  color: var(--hazgen-text);

  box-shadow: none;
}

.secondary-btn:hover {
  background: #f1f5f2;
  color: var(--hazgen-text);
  box-shadow: none;
}

/*
|--------------------------------------------------------------------------
| Corporate sidebar
|--------------------------------------------------------------------------
*/

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;

  z-index: 1000;

  width: var(--sidebar-width);
  height: 100vh;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      #192820 0%,
      var(--hazgen-sidebar) 58%,
      #121a16 100%
    );

  color: #ffffff;

  box-shadow:
    7px 0 30px
    rgba(19, 31, 24, 0.15);
}

/*
|--------------------------------------------------------------------------
| Sidebar brand
|--------------------------------------------------------------------------
*/

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;

  min-height: 104px;
  padding: 20px 18px;

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.09);
}

.sidebar-logo {
  width: 74px;
  max-height: 70px;

  flex-shrink: 0;

  object-fit: contain;

  padding: 5px;

  border-radius: 10px;

  background:
    rgba(255, 255, 255, 0.96);
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-brand-copy strong {
  display: block;

  margin-bottom: 3px;

  color: #ffffff;

  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
}

.sidebar-brand-copy span {
  display: block;

  color:
    rgba(255, 255, 255, 0.62);

  font-size: 11px;
  line-height: 1.35;
}

/*
|--------------------------------------------------------------------------
| Sidebar user card
|--------------------------------------------------------------------------
*/

.sidebar-user-card {
  position: relative;

  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 11px;

  margin: 17px 15px 10px;
  padding: 12px;

  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.055);
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      var(--hazgen-orange),
      #d7650a
    );

  color: #ffffff;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.sidebar-user-copy {
  min-width: 0;
}

.sidebar-user-copy strong {
  display: block;

  overflow: hidden;

  color: #ffffff;

  font-size: 13px;
  font-weight: 700;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-user-copy span {
  display: block;

  margin-top: 2px;

  overflow: hidden;

  color:
    rgba(255, 255, 255, 0.6);

  font-size: 11px;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-user-status {
  width: 9px;
  height: 9px;

  border:
    2px solid
    rgba(255, 255, 255, 0.3);

  border-radius: 50%;

  background: #42c477;

  box-shadow:
    0 0 0 3px
    rgba(66, 196, 119, 0.1);
}

/*
|--------------------------------------------------------------------------
| Sidebar navigation
|--------------------------------------------------------------------------
*/

.sidebar-nav {
  flex: 1;

  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 4px 13px 16px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(255, 255, 255, 0.22)
    transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 20px;

  background:
    rgba(255, 255, 255, 0.2);
}

.sidebar-section-label {
  margin: 17px 11px 7px;

  color:
    rgba(255, 255, 255, 0.4);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sidebar-nav-item {
  position: relative;

  display: flex;
  align-items: center;
  gap: 11px;

  min-height: 43px;
  padding: 10px 12px;

  border:
    1px solid
    transparent;

  border-radius: 9px;

  color:
    rgba(255, 255, 255, 0.78);

  text-decoration: none;

  font-size: 13px;
  font-weight: 600;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.sidebar-nav-item:hover {
  border-color:
    rgba(255, 255, 255, 0.06);

  background:
    rgba(255, 255, 255, 0.07);

  color: #ffffff;

  transform: translateX(2px);
}

.sidebar-nav-item.active {
  border-color:
    rgba(245, 130, 32, 0.38);

  background:
    linear-gradient(
      90deg,
      rgba(245, 130, 32, 0.24),
      rgba(245, 130, 32, 0.08)
    );

  color: #ffffff;

  box-shadow:
    inset 3px 0 0
    var(--hazgen-orange);
}

.sidebar-nav-item.active::after {
  content: "";

  position: absolute;
  top: 50%;
  right: 11px;

  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--hazgen-orange);

  transform: translateY(-50%);
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.sidebar-nav-icon svg {
  width: 19px;
  height: 19px;
}

.sidebar-nav-label {
  min-width: 0;

  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

/*
|--------------------------------------------------------------------------
| Sidebar footer
|--------------------------------------------------------------------------
*/

.sidebar-footer {
  padding: 14px 15px 18px;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.09);

  background:
    rgba(0, 0, 0, 0.08);
}

.sidebar-company-note {
  margin-bottom: 11px;
  padding: 0 3px;
}

.sidebar-company-note span {
  display: block;

  color:
    rgba(255, 255, 255, 0.72);

  font-size: 10px;
  font-weight: 700;
}

.sidebar-company-note small {
  display: block;

  margin-top: 2px;

  color:
    rgba(255, 255, 255, 0.4);

  font-size: 9px;
}

.logout-btn {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;

  min-height: 42px;
  margin: 0;
  padding: 10px 12px;

  border:
    1px solid
    rgba(255, 255, 255, 0.09);

  border-radius: 9px;

  background:
    rgba(180, 35, 24, 0.16);

  color: #ffb6b0;

  box-shadow: none;
}

.logout-btn:hover {
  background:
    rgba(180, 35, 24, 0.32);

  color: #ffffff;

  box-shadow: none;
}

/*
|--------------------------------------------------------------------------
| Main application area
|--------------------------------------------------------------------------
*/

.main {
  min-height: 100vh;

  margin-left: var(--sidebar-width);
  padding: 30px 32px 45px;
}

#pageContent {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

/*
|--------------------------------------------------------------------------
| Page heading
|--------------------------------------------------------------------------
*/

.page-header {
  position: relative;

  margin-bottom: 23px;
  padding-left: 16px;
}

.page-header::before {
  content: "";

  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;

  width: 5px;

  border-radius: 5px;

  background:
    linear-gradient(
      180deg,
      var(--hazgen-orange),
      var(--hazgen-green)
    );
}

.page-header h1,
#pageContent > h1 {
  margin: 0 0 6px;

  color: #203027;

  font-size: 29px;
  font-weight: 760;
  letter-spacing: -0.55px;
}

.page-header p,
#pageContent > p {
  margin: 0;

  color: var(--hazgen-muted);

  font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| Panels
|--------------------------------------------------------------------------
*/

.panel {
  margin-bottom: 22px;
  padding: 23px;

  border:
    1px solid
    var(--hazgen-border);

  border-radius: 14px;

  background: var(--hazgen-surface);

  box-shadow: var(--hazgen-shadow);

  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.panel:hover {
  box-shadow:
    0 11px 32px
    rgba(30, 47, 38, 0.085);
}

.panel h2 {
  margin: 0 0 17px;

  color: #25362c;

  font-size: 19px;
  font-weight: 730;
}

.panel h3 {
  color: var(--hazgen-green-dark);
}

/*
|--------------------------------------------------------------------------
| Dashboard cards
|--------------------------------------------------------------------------
*/

.cards,
.analytics-cards,
.dashboard-cards {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 16px;

  margin: 20px 0 23px;
}

.card,
.analytics-card,
.metric-card {
  position: relative;

  min-width: 0;
  min-height: 125px;

  padding: 21px 21px 19px 25px;

  overflow: hidden;

  border:
    1px solid
    var(--hazgen-border);

  border-radius: 13px;

  background: var(--hazgen-surface);
  color: var(--hazgen-text);

  box-shadow: var(--hazgen-shadow);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover,
.analytics-card:hover,
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hazgen-shadow-hover);
}

.card::before,
.analytics-card::before,
.metric-card::before {
  content: "";

  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;

  width: 5px;

  background: var(--hazgen-orange);
}

.card span,
.analytics-card span,
.metric-card span {
  display: block;

  margin-bottom: 11px;

  color: var(--hazgen-muted);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.card strong,
.analytics-card strong,
.metric-card strong {
  display: block;

  color: #213027;

  font-size: 25px;
  font-weight: 780;
  line-height: 1.15;
}

.card small,
.analytics-card small,
.metric-card small {
  display: block;

  margin-top: 10px;

  color: var(--hazgen-muted);

  font-size: 11px;
}

.card-orange::before,
.orange::before {
  background: var(--hazgen-orange);
}

.card-dark::before,
.blue::before {
  background: #34473d;
}

.card-gold::before {
  background: var(--hazgen-gold);
}

.card-red::before,
.red::before {
  background: var(--hazgen-red);
}

.card-green::before,
.green::before {
  background: var(--hazgen-green);
}

.positive-change {
  color: #27804d !important;
}

.negative-change {
  color: var(--hazgen-red) !important;
}

/*
|--------------------------------------------------------------------------
| Grid layouts
|--------------------------------------------------------------------------
*/

.grid-2,
.comparison-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 20px;
}

.form-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 14px;
}

.form-grid button {
  align-self: end;
}

/*
|--------------------------------------------------------------------------
| Dashboard toolbar
|--------------------------------------------------------------------------
*/

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 15px;
}

.dashboard-toolbar > div {
  min-width: 170px;
}

.dashboard-toolbar label {
  margin-top: 0;
}

.chart-container {
  position: relative;

  width: 100%;
  min-height: 390px;
}

/*
|--------------------------------------------------------------------------
| Tables
|--------------------------------------------------------------------------
*/

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

.scroll-table {
  max-height: 520px;

  overflow-y: auto;

  border:
    1px solid
    var(--hazgen-border);

  border-radius: 11px;
}

table {
  width: 100%;

  border-collapse: separate;
  border-spacing: 0;

  background: var(--hazgen-surface);
}

th,
td {
  padding: 12px 13px;

  border-bottom:
    1px solid
    #e6ebe8;

  vertical-align: top;

  font-size: 13px;
}

th {
  background: #eef3f0;
  color: #334139;

  text-align: left;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

thead tr:first-child th:first-child {
  border-top-left-radius: 9px;
}

thead tr:first-child th:last-child {
  border-top-right-radius: 9px;
}

td {
  color: #36413b;
}

tbody tr {
  transition:
    background 0.16s ease;
}

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

tbody tr:hover td {
  background: #f3f7f4;
}

table button {
  min-height: 34px;

  padding: 7px 10px;

  font-size: 11px;
}

.year-comparison-table td,
.year-comparison-table th {
  text-align: right;
}

.year-comparison-table td:first-child,
.year-comparison-table th:first-child {
  text-align: left;
}

/*
|--------------------------------------------------------------------------
| Actions and totals
|--------------------------------------------------------------------------
*/

.actions,
.expense-actions,
.quotation-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.totals {
  margin: 18px 0;

  color: var(--hazgen-green-dark);

  text-align: right;
  font-size: 18px;
  font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Status badges
|--------------------------------------------------------------------------
*/

.status-badge,
.status-paid,
.status-outstanding,
.status-partial {
  display: inline-block;

  min-width: 90px;

  padding: 5px 10px;

  border-radius: 999px;

  text-align: center;
  font-size: 11px;
  font-weight: 750;
}

.status-paid {
  border:
    1px solid
    #a7d8b9;

  background: #e6f6eb;
  color: #176336;
}

.status-outstanding {
  border:
    1px solid
    #efb2ad;

  background: #fff0ee;
  color: #9f241b;
}

.status-partial {
  border:
    1px solid
    #f1d18f;

  background: #fff7e6;
  color: #97610c;
}

/*
|--------------------------------------------------------------------------
| Customer statement invoice services
|--------------------------------------------------------------------------
*/

.invoice-summary-row {
  background: var(--hazgen-surface);
}

.invoice-summary-row td {
  vertical-align: middle;
}

.invoice-services-row td {
  padding:
    0
    12px
    16px;

  background: #f7f9f8 !important;
}

.invoice-services {
  margin-top: 8px;
  padding: 14px;

  border-left:
    4px solid
    var(--hazgen-orange);

  border-radius: 8px;

  background: var(--hazgen-surface);

  box-shadow:
    0 4px 14px
    rgba(0, 0, 0, 0.05);
}

.invoice-services-title {
  margin-bottom: 10px;

  color: var(--hazgen-green-dark);

  font-size: 14px;
  font-weight: 700;
}

.invoice-services-table {
  width: 100%;

  border-collapse: collapse;

  background: var(--hazgen-surface);
}

.invoice-services-table th,
.invoice-services-table td {
  padding: 9px 10px;

  border-bottom:
    1px solid
    #dfe5e1;

  text-align: left;
  font-size: 12px;
}

.invoice-services-table th {
  background: #eef3ef;
  color: var(--hazgen-green-dark);
}

.invoice-services-table td:nth-child(3),
.invoice-services-table td:nth-child(5),
.invoice-services-table td:nth-child(6) {
  text-align: right;
  white-space: nowrap;
}

.invoice-services-table td:nth-child(4) {
  white-space: nowrap;
}

.invoice-services-empty {
  margin-top: 8px;
  padding: 12px;

  border-radius: 7px;

  background: #f1f4f2;
  color: var(--hazgen-muted);

  font-size: 13px;
  font-style: italic;
}

/*
|--------------------------------------------------------------------------
| Expense filters and summary
|--------------------------------------------------------------------------
*/

.expense-filters,
.quotation-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 15px;

  margin-bottom: 20px;
  padding: 15px;

  border:
    1px solid
    var(--hazgen-border);

  border-radius: 11px;

  background: var(--hazgen-surface-soft);
}

.expense-filters > div,
.quotation-filter-group {
  min-width: 190px;

  display: flex;
  flex-direction: column;
}

.expense-filters label,
.quotation-filter-group label {
  margin-top: 0;
}

.expense-summary {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(150px, 1fr)
    );

  gap: 12px;

  margin-bottom: 20px;
}

.expense-summary-item {
  padding: 15px;

  border:
    1px solid
    var(--hazgen-border);

  border-left:
    4px solid
    var(--hazgen-orange);

  border-radius: 9px;

  background: var(--hazgen-surface-soft);
}

.expense-summary-item span {
  display: block;

  margin-bottom: 5px;

  color: var(--hazgen-muted);

  font-size: 12px;
}

.expense-summary-item strong {
  color: var(--hazgen-green-dark);

  font-size: 17px;
}

.table-responsive table {
  min-width: 1500px;
}

.table-responsive th,
.table-responsive td {
  white-space: nowrap;
}

.budget-over {
  color: var(--hazgen-red);
  font-weight: 750;
}

.budget-remaining {
  color: var(--hazgen-green);
  font-weight: 750;
}

.budget-none {
  color: var(--hazgen-muted);
}

/*
|--------------------------------------------------------------------------
| Filter summary and empty state
|--------------------------------------------------------------------------
*/

.quotation-filter-summary,
.expense-filter-summary {
  margin-bottom: 15px;
  padding: 13px 15px;

  border-left:
    4px solid
    var(--hazgen-orange);

  border-radius: 8px;

  background: var(--hazgen-orange-light);
  color: #61401f;
}

.empty-state {
  padding: 30px;

  border:
    1px dashed
    #cfd8d2;

  border-radius: 11px;

  background: #fafcfb;

  color: var(--hazgen-muted);

  text-align: center;
}

/*
|--------------------------------------------------------------------------
| Idle-session warning
|--------------------------------------------------------------------------
*/

#hazgenIdleModal {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background:
    rgba(9, 15, 11, 0.72);

  backdrop-filter: blur(5px);
}

.hazgen-idle-card {
  width: 100%;
  max-width: 440px;

  padding: 32px;

  border-top:
    5px solid
    var(--hazgen-orange);

  border-radius: 18px;

  background: var(--hazgen-surface);
  color: var(--hazgen-text);

  text-align: center;

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.3);
}

.hazgen-idle-icon {
  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin:
    0 auto 18px;

  border-radius: 50%;

  background: var(--hazgen-orange-light);
  color: var(--hazgen-orange);

  font-size: 36px;
  font-weight: 800;
}

.hazgen-idle-card h2 {
  margin:
    0 0 12px;

  color: var(--hazgen-green-dark);

  font-size: 27px;
}

.hazgen-idle-card p {
  margin: 8px 0;

  color: var(--hazgen-muted);

  line-height: 1.6;
}

#hazgenIdleCountdown {
  color: var(--hazgen-orange-dark);

  font-size: 20px;
}

.hazgen-idle-actions {
  display: flex;
  gap: 12px;

  margin-top: 24px;
}

.hazgen-idle-actions button {
  flex: 1;
}

.hazgen-idle-actions
.hazgen-idle-logout {
  background:
    linear-gradient(
      135deg,
      var(--hazgen-red),
      var(--hazgen-red-dark)
    );
}

/*
|--------------------------------------------------------------------------
| Responsive layout
|--------------------------------------------------------------------------
*/

@media (max-width: 1200px) {
  .cards,
  .analytics-cards,
  .dashboard-cards {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  :root {
    --sidebar-width: 100%;
  }

  .sidebar {
    position: relative;

    width: 100%;
    height: auto;

    overflow: visible;
  }

  .sidebar-brand {
    min-height: auto;
  }

  .sidebar-user-card {
    max-width: 420px;
  }

  .sidebar-nav {
    max-height: none;
    overflow: visible;
  }

  .sidebar-footer {
    position: relative;
  }

  .main {
    margin-left: 0;
    padding: 22px;
  }

  .grid-2,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .login-card {
    padding: 30px 21px;
  }

  .main {
    padding: 15px;
  }

  .panel {
    padding: 17px;
    border-radius: 11px;
  }

  .page-header h1,
  #pageContent > h1 {
    font-size: 24px;
  }

  .cards,
  .analytics-cards,
  .dashboard-cards,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .analytics-card,
  .metric-card {
    padding: 18px 18px 18px 22px;
  }

  .card strong,
  .analytics-card strong,
  .metric-card strong {
    font-size: 22px;
  }

  .dashboard-toolbar,
  .expense-filters,
  .quotation-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-toolbar > div,
  .expense-filters > div,
  .quotation-filter-group {
    width: 100%;
    min-width: 0;
  }

  .actions,
  .expense-actions,
  .quotation-action-buttons {
    flex-direction: column;
  }

  button,
  .actions a,
  .btn-link {
    width: 100%;
  }

  th,
  td {
    padding: 9px;

    font-size: 11px;
  }

  .hazgen-idle-card {
    padding: 24px 18px;
  }

  .hazgen-idle-card h2 {
    font-size: 23px;
  }

  .hazgen-idle-actions {
    flex-direction: column;
  }
}

/*
|--------------------------------------------------------------------------
| Print styling
|--------------------------------------------------------------------------
*/

@media print {
  .sidebar,
  .sidebar-footer,
  .actions,
  button {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .main {
    width: 100%;

    margin: 0;
    padding: 0;
  }

  .panel {
    border:
      1px solid
      #dddddd;

    box-shadow: none;

    break-inside: avoid;
  }

  .invoice-services,
  .invoice-services-row,
  .invoice-summary-row {
    break-inside: avoid;
  }
}