:root{
    --hsf-green:#006b3f;
    --hsf-green-dark:#004d2d;
    --hsf-bg:#f4f7f6;
    --hsf-text:#1f2937;
    --hsf-border:#d7dde3;
    --hsf-card:#ffffff;
    --hsf-shadow:0 8px 25px rgba(0,0,0,.08);
}

body{
    margin:0;
    background:var(--hsf-bg);
    font-family:"Segoe UI",Arial,sans-serif;
    font-size:15px;
    color:var(--hsf-text);
}

.app-shell{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    background:linear-gradient(180deg,#004d2d,#006b3f);
    color:#fff;
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    overflow-y:auto;
}

.sidebar-brand{
    padding:24px;
    font-size:24px;
    font-weight:900;
}

.sidebar a{
    display:block;
    padding:12px 18px;
    color:#fff;
    text-decoration:none;
    font-weight:600;
}

.sidebar a:hover{
    background:rgba(255,255,255,.15);
}

.menu-title{
    margin:20px 18px 10px;
    padding-top:12px;
    border-top:1px solid rgba(255,255,255,.2);
    font-size:11px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase;
    color:#c7d2da;
}

.main-content{
    margin-left:260px;
    width:calc(100% - 260px);
}

.brand-strip{
    background:#ffffff;
    border-top:3px solid #0b6b3a;
    border-bottom:1px solid #d9e3df;

    padding:12px 25px;

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

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

    margin-bottom:25px;
}

.content-section{
    padding:28px;
}

.page-title{
    font-size:32px;
    font-weight:900;
    color:#17324d;
    margin-bottom:24px;
}

.card{
    border:none;
    border-radius:18px;
    background:#fff;
    box-shadow:var(--hsf-shadow);
}

.card h4,
.card h5{
    font-weight:800;
    color:#17324d;
}

.form-label{
    font-size:14px;
    font-weight:800;
    color:#17324d;
}

.form-control,
.form-select{
    min-height:46px;
    border-radius:10px;
    border:1px solid var(--hsf-border);
}

.form-control:focus,
.form-select:focus{
    border-color:var(--hsf-green);
    box-shadow:0 0 0 .2rem rgba(0,107,63,.15);
}

.btn{
    border-radius:10px;
    font-weight:700;
}

.btn-hsf{
    background:var(--hsf-green);
    color:#fff;
    border:none;
}

.btn-hsf:hover{
    background:var(--hsf-green-dark);
    color:#fff;
}

.table{
    font-size:14px;
}

.table th{
    background:#eef5f1;
    color:#17324d;
    text-transform:uppercase;
    font-size:12px;
    font-weight:800;
    letter-spacing:.5px;
}

.table td{
    vertical-align:middle;
}

.kpi-card{
    padding:18px;
}

.kpi-card span{
    display:block;
    text-transform:uppercase;
    font-size:12px;
    color:#64748b;
    font-weight:700;
}

.kpi-card strong{
    display:block;
    font-size:28px;
    color:var(--hsf-green);
}

.badge-status{
    padding:7px 14px;
    border-radius:20px;
    font-weight:800;
}

.status-open{
    background:#dbeafe;
    color:#1e40af;
}

.status-process{
    background:#fef3c7;
    color:#92400e;
}

.status-delivered,
.status-passed,
.status-closed{
    background:#d1fae5;
    color:#065f46;
}

.status-critical{
    background:#fee2e2;
    color:#991b1b;
}

.voucher-paper,
.gatepass-paper{
    background:#fff;
    max-width:950px;
    margin:auto;
    padding:35px;
    border-radius:12px;
}

.voucher-header,
.gp-header{
    text-align:center;
    margin-bottom:25px;
    border-bottom:2px solid var(--hsf-green);
    padding-bottom:12px;
}

.voucher-table,
.gp-table{
    width:100%;
    border-collapse:collapse;
}

.voucher-table th,
.gp-table th{
    background:#eef5f1;
    font-size:12px;
    text-transform:uppercase;
}

.voucher-table th,
.voucher-table td,
.gp-table th,
.gp-table td{
    border:1px solid #d8dee4;
    padding:10px;
}

@media print{
    .sidebar,
    .brand-strip,
    .page-title,
    .no-print,
    footer{
        display:none!important;
    }

    .main-content{
        margin:0!important;
        width:100%!important;
    }

    .content-section{
        padding:0!important;
    }

    .voucher-paper,
    .gatepass-paper{
        max-width:100%;
        width:100%;
        padding:10mm;
        box-shadow:none;
    }

    @page{
        size:A4 portrait;
        margin:8mm;
    }
}

@media(max-width:900px){

    .sidebar{
        position:relative;
        width:100%;
    }

    .main-content{
        margin-left:0;
        width:100%;
    }

    .app-shell{
        display:block;
    }
}

.menu-group {
    margin: 6px 10px;
}

.menu-toggle {
    width: 100%;
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
    white-space:nowrap;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    padding: 12px 14px;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
}

.menu-toggle span {
    float:none;
    margin-left:auto;
    flex:0 0 auto;
    line-height:1;
}

.menu-toggle:hover {
    background: rgba(255,255,255,.14);
}

.submenu {
    display: none;
    margin-left: 10px;
    border-left: 2px solid rgba(255,255,255,.18);
}

.submenu.open {
    display: block;
}

.submenu a {
    padding: 9px 16px;
    font-size: 14px;
    color: #e5f4ee;
}

.submenu a:hover {
    background: rgba(255,255,255,.12);
}

.sidebar-home {
    display: block;
    margin: 8px 10px 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.sidebar-home:hover {
    background: rgba(255,255,255,.14);
}



.login-wrapper{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:
    linear-gradient(
        135deg,
        #004d2d,
        #006b3f
    );
}

.login-card{
    width:380px;
    max-width:calc(100% - 30px);
    background:#fff;
    border-radius:14px;
    padding:24px 26px;
    box-shadow:
        0 15px 40px rgba(0,0,0,.20);
}

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

.login-logo img{
    width:62px;
}

.login-card h2{
    text-align:center;
    font-size:22px;
    line-height:1.18;
    font-weight:900;
    color:#17324d;
    margin-bottom:6px;
}

.login-subtitle{
    text-align:center;
    color:#64748b;
    margin-bottom:14px;
    font-size:14px;
}

.login-card .mb-3{
    margin-bottom:11px!important;
}

.login-card label{
    margin-bottom:4px;
    font-size:13px;
}

.login-card .form-control,
.login-card .form-select{
    min-height:42px;
    height:42px;
    padding:7px 11px;
    font-size:14px;
}

.login-card small{
    display:block;
    margin-top:3px;
    font-size:11px;
    line-height:1.25;
}

.login-card .btn{
    min-height:42px;
    padding:7px 14px;
}

.login-footer{
    text-align:center;
    margin-top:12px;
    font-size:12px;
    color:#64748b;
}

.module-menu {
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.module-menu-header h4 {
    margin: 0;
    font-weight: 900;
    color: #12304a;
}

.module-menu-header p {
    margin: 6px 0 18px;
    color: #64748b;
    font-size: 14px;
}

.erp-menu-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    min-height: 92px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #12304a;
    text-decoration: none;
    transition: 0.2s ease;
}

.erp-menu-card:hover {
    transform: translateY(-2px);
    border-color: #006b3f;
    box-shadow: 0 8px 20px rgba(0, 107, 63, 0.12);
    color: #006b3f;
}

.erp-menu-card.active {
    background: linear-gradient(135deg, #006b3f, #008f5a);
    color: #ffffff;
    border-color: #006b3f;
}

.erp-menu-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(0, 107, 63, 0.10);
    font-size: 22px;
}

.erp-menu-card.active .erp-menu-icon {
    background: rgba(255,255,255,0.18);
}

.erp-menu-card h6 {
    margin: 0;
    font-weight: 900;
    font-size: 15px;
}

.erp-menu-card small {
    font-size: 12px;
    opacity: 0.8;
}

.erp-banner{
    width:100%;
    height:370px;              /* Change to 150px if you want even smaller */
    overflow:hidden;
    border-radius:10px;
    background:#fff;
    margin-bottom:0;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.erp-banner img,
.erp-banner-img{
    width:100%;
    height:100%;
    object-fit:cover;          /* Keeps the banner proportional */
    display:block;
}

/* =====================================================
   SALES DOCUMENT LIST TABLE (ERP v5.0)
===================================================== */

.sales-list-table {
    width: max-content;
    min-width: 100%;
}

.sales-list-table th,
.sales-list-table td {
    white-space: nowrap;
    vertical-align: middle;
    padding: 8px 12px;
}

.sales-list-table th {
    background: #f5f7fa;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
}


/* ==========================================================
   HOLETA ERP DOCUMENT STATUS COLORS
   ========================================================== */

/* Approved */
.sales-list-table tr.approved td{
    color:#008000 !important;
}

/* Checked */
.sales-list-table tr.checked td{
    color:#000 !important;
}

/* Accepted */
.sales-list-table tr.accepted td{
    color:#0047AB !important;
}

/* Edited */
.sales-list-table tr.edited td{
    color:#8A2BE2 !important;
}

/* Prepared */
.sales-list-table tr.prepared td{
    color:#444 !important;
}

/* Production Started */
.sales-list-table tr.production_started td{
    color:#ff6600 !important;
}

/* Partially Produced */
.sales-list-table tr.partially_produced td{
    color:#ff8c00 !important;
}

/* Fully Produced */
.sales-list-table tr.fully_produced td{
    color:#008000 !important;
}

/* Quality Passed */
.sales-list-table tr.quality_passed td{
    color:#006400 !important;
}

/* Quality Failed */
.sales-list-table tr.quality_failed td{
    color:#ff0000 !important;
}

/* Scheduled */
.sales-list-table tr.scheduled td{
    color:#005bbb !important;
}

/* Dispatched */
.sales-list-table tr.dispatched td{
    color:#0066cc !important;
}

/* Delivered */
.sales-list-table tr.delivered td{
    color:#008000 !important;
}

/* Closed */
.sales-list-table tr.closed td{
    color:#008000 !important;
}

/* VOID / VOIDED */
.sales-list-table tr.void td,
.sales-list-table tr.voided td{
    color:#ff0000 !important;
    font-weight:bold !important;
    text-decoration:line-through;
}
/* ERP responsive collapsible navigation — v2.4.49 */
:root {
  --erp-sidebar-expanded: 260px;
  --erp-sidebar-collapsed: 76px;
}

.sidebar,
.main-content {
  transition: width .22s ease, margin-left .22s ease, transform .22s ease;
}

.brand-strip-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8e1dd;
  border-radius: 8px;
  background: #fff;
  color: #f47721;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-toggle-button:hover,
.sidebar-toggle-button:focus-visible {
  background: #f47721;
  color: #fff;
  outline: 3px solid rgba(244, 119, 33, .2);
}

.sidebar-overlay { display: none; }
.menu-toggle::before { display: none; }

@media (min-width: 1101px) {
  .app-shell.sidebar-collapsed .sidebar {
    width: var(--erp-sidebar-collapsed);
    overflow-x: hidden;
  }

  .app-shell.sidebar-collapsed .main-content {
    width: calc(100% - var(--erp-sidebar-collapsed));
    margin-left: var(--erp-sidebar-collapsed);
  }

  .app-shell.sidebar-collapsed .sidebar-brand {
    padding: 16px 8px;
    font-size: 0;
    text-align: center;
  }

  .app-shell.sidebar-collapsed .sidebar-brand img {
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    object-fit: contain;
  }

  .app-shell.sidebar-collapsed .sidebar-home,
  .app-shell.sidebar-collapsed .menu-toggle {
    min-height: 50px;
    padding: 13px 6px;
    font-size: 0;
    text-align: center;
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .sidebar-home::before,
  .app-shell.sidebar-collapsed .menu-toggle::before {
    display: inline-block;
    content: attr(data-menu-icon);
    font-size: 16px;
    line-height: 1;
  }

  .app-shell.sidebar-collapsed .menu-toggle span,
  .app-shell.sidebar-collapsed .submenu {
    display: none !important;
  }

  .app-shell.sidebar-collapsed .menu-group { margin: 6px; }
}

@media (max-width: 1100px) {
  .app-shell { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    width: min(300px, 86vw);
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-105%);
    box-shadow: 12px 0 32px rgba(0, 31, 21, .25);
  }

  .main-content {
    width: 100% !important;
    min-width: 0;
    margin-left: 0 !important;
  }

  body.sidebar-mobile-open { overflow: hidden; }
  body.sidebar-mobile-open .sidebar { transform: translateX(0); }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1190;
    border: 0;
    background: rgba(2, 28, 20, .58);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .brand-strip {
    position: sticky;
    top: 0;
    z-index: 1100;
    gap: 10px;
  }

  .brand-strip > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content-section { padding: 16px; }
}

@media (max-width: 640px) {
  .brand-strip { padding: 8px 10px; }

  .brand-strip-start strong {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .brand-strip > span {
    max-width: 38vw;
    font-size: 12px;
  }

  .content-section { padding: 12px; }
}

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

/* Shared workflow row palette: PRV/POV/BPV/CPV, BDV/CRV and Sales vouchers. */
.hsf-status-row { cursor: pointer; transition: background-color .12s ease, color .12s ease; }
.hsf-status-row > td { background-color: var(--hsf-row-colour, #f8fafc) !important; }
.hsf-status-row.hsf-status-unknown > td { --hsf-row-colour: #f8fafc; }
.hsf-status-row.hsf-status-draft > td { --hsf-row-colour: #f3f4f6; }
.hsf-status-row.hsf-status-prepared > td { --hsf-row-colour: #edf1f5; }
.hsf-status-row.hsf-status-edited > td { --hsf-row-colour: #eee8ff; }
.hsf-status-row.hsf-status-pending > td,
.hsf-status-row.hsf-status-pending_approval > td { --hsf-row-colour: #fff4cc; }
.hsf-status-row.hsf-status-checked > td { --hsf-row-colour: #dff4ff; }
.hsf-status-row.hsf-status-approved > td { --hsf-row-colour: #dcf5e7; }
.hsf-status-row.hsf-status-accepted > td { --hsf-row-colour: #d9f4ef; }
.hsf-status-row.hsf-status-production_scheduled > td { --hsf-row-colour: #e7edff; }
.hsf-status-row.hsf-status-production_started > td { --hsf-row-colour: #dce8ff; }
.hsf-status-row.hsf-status-partially_produced > td { --hsf-row-colour: #d8e2ff; }
.hsf-status-row.hsf-status-fully_produced > td { --hsf-row-colour: #dcecff; }
.hsf-status-row.hsf-status-quality_passed > td { --hsf-row-colour: #d7f4df; }
.hsf-status-row.hsf-status-quality_failed > td { --hsf-row-colour: #ffe0e0; }
.hsf-status-row.hsf-status-delivery_scheduled > td { --hsf-row-colour: #e4e5ff; }
.hsf-status-row.hsf-status-dispatched > td { --hsf-row-colour: #dce7fb; }
.hsf-status-row.hsf-status-delivered > td { --hsf-row-colour: #d9f1e2; }
.hsf-status-row.hsf-status-closed > td,
.hsf-status-row.hsf-status-posted > td { --hsf-row-colour: #d7eee2; }
.hsf-status-row.hsf-status-rejected > td { --hsf-row-colour: #ffe8c7; }
.hsf-status-row.hsf-status-void > td,
.hsf-status-row.hsf-status-voided > td,
.hsf-status-row.hsf-status-reversed > td,
.hsf-status-row.hsf-status-cancelled > td { --hsf-row-colour: #ffdede; }
.hsf-status-row:not(.hsf-row-selected):hover > td { background-color: #cfe5ff !important; }
.hsf-status-row.hsf-row-selected > td,
.hsf-status-row.hsf-row-selected:hover > td { background-color: #123a67 !important; color: #fff !important; }
.hsf-status-row.hsf-row-selected > td a,
.hsf-status-row.hsf-row-selected > td strong,
.hsf-status-row.hsf-row-selected > td small { color: #fff !important; }
.hsf-status-row.hsf-row-selected > td input { color: #10253d; }
body .fin-table tbody tr.hsf-row-selected > td,
body .sales-list-table tbody tr.hsf-row-selected > td,
body #accountingTable tbody tr.hsf-row-selected > td { background-color: #123a67 !important; color: #fff !important; text-decoration-color: #fff !important; }
