:root {
    --primary-dark: #1e466e;
    --primary: #2c5a8c;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    background: #f4f7fb;
    color: #34495e;
}

#wrapper {
    background: #f4f7fb;
}

#left-sidebar.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 45%, #eef6fc 100%);
    box-shadow: 4px 0 24px rgba(30, 70, 110, .10);
    border-right: 1px solid #e9eef5;
}

#left-sidebar .btn-toggle-fullwidth {
    width: 32px;
    height: 32px;
    right: -15px;
    top: 14px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    box-shadow: 0 6px 14px rgba(52, 152, 219, .26);
    opacity: 1;
}

#left-sidebar .sidebar-scroll {
    padding-top: 18px;
}

#left-sidebar-nav {
    padding: 0 14px 20px;
}

#main-menu.metismenu > li {
    margin: 2px 0;
}

#main-menu.metismenu li a {
    color: #40566f;
    border-radius: 12px;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .1px;
    transition: all .2s ease;
    border: 1px solid transparent;
}

#main-menu.metismenu > li > a {
    display: flex;
    align-items: center;
    min-height: 38px;
}

#main-menu.metismenu li a i {
    width: 24px;
    margin-right: 10px;
    color: #3498db;
    font-size: 17px;
    text-align: center;
    transition: all .2s ease;
}

#main-menu.metismenu li a span {
    flex: 1;
}

#main-menu.metismenu li a:hover,
#main-menu.metismenu li.active > a,
#main-menu.metismenu li.mm-active > a {
    color: #1e466e;
    background: linear-gradient(135deg, #eef6fc 0%, #ffffff 100%);
    border-color: #d8e8f5;
    box-shadow: 0 6px 16px rgba(52, 152, 219, .12), inset 3px 0 0 #3498db;
    text-decoration: none;
}

#main-menu.metismenu li a:hover i,
#main-menu.metismenu li.active > a i,
#main-menu.metismenu li.mm-active > a i {
    color: #1e466e;
}

#main-menu.metismenu .arrow {
    margin-left: auto;
    color: #9aaabd;
    transition: transform .2s ease;
}

#main-menu.metismenu li.active > a .arrow,
#main-menu.metismenu li.mm-active > a .arrow {
    color: #3498db;
    transform: rotate(90deg);
}

#main-menu.metismenu .submenu {
    margin: 7px 0 10px 14px;
    padding: 8px 0 8px 10px;
    border-left: 2px solid #d8e8f5;
    background: #f8fbfe;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px #eef3f8;
}

#main-menu.metismenu li.active > .submenu,
#main-menu.metismenu li.mm-active > .submenu,
#main-menu.metismenu .submenu.in {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
}

#main-menu.metismenu .submenu li {
    margin: 2px 8px 2px 0;
}

#main-menu.metismenu .submenu li a {
    padding: 8px 12px;
    color: #5f7085;
    font-size: 13px;
    font-weight: 500;
    border-radius: 9px;
}

#main-menu.metismenu .submenu li a:before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-radius: 50%;
    background: #b6d9f2;
    vertical-align: middle;
}

#main-menu.metismenu .submenu li a:hover,
#main-menu.metismenu .submenu li.active > a {
    color: #1e466e;
    background: #ffffff;
    border-color: #e3edf6;
    box-shadow: 0 4px 12px rgba(30, 70, 110, .08);
}

#main-menu.metismenu .submenu li.active > a {
    color: #ffffff;
    background: linear-gradient(135deg, #2c5a8c, #3498db);
    border-color: #3498db;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(52, 152, 219, .25);
}

#main-menu.metismenu > li.active > a,
#main-menu.metismenu > li.mm-active > a {
    color: #1e466e;
    background: #e9f4fb;
    border-color: #cfe3f3;
    box-shadow: inset 4px 0 0 #3498db;
}

#main-menu.metismenu .submenu li a:hover:before,
#main-menu.metismenu .submenu li.active > a:before {
    background: #3498db;
}

#main-menu.metismenu .submenu li.active > a:before {
    background: #ffffff;
}

.navbar.navbar-default.navbar-fixed-top {
    min-height: 58px;
    background: rgba(255, 255, 255, .96);
    border: 0;
    border-bottom: 1px solid #e8eef5;
    box-shadow: 0 4px 18px rgba(30, 70, 110, .08);
    backdrop-filter: blur(8px);
}

.navbar .container-fluid {
    display: flex;
    align-items: center;
    min-height: 58px;
}

.navbar-btn {
    margin: 0 14px 0 0;
}

.btn-toggle-offcanvas {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    color: #1e466e;
    background: linear-gradient(135deg, #eef6fc, #ffffff);
    box-shadow: 0 6px 16px rgba(30, 70, 110, .10);
    transition: all .2s ease;
}

.btn-toggle-offcanvas:hover {
    color: #ffffff;
    background: #3498db;
    box-shadow: 0 8px 18px rgba(52, 152, 219, .28);
}

.navbar-brand {
    display: flex;
    align-items: center;
    height: 58px;
    padding: 0;
    min-width: 190px;
}

.navbar-brand a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 18px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    color: #1e466e;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .2px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(30, 70, 110, .07);
    transition: all .2s ease;
}

.navbar-brand a:hover {
    color: #1e466e;
    background: #f8fbfe;
    border-color: #d8e8f5;
    text-decoration: none;
}

.navbar-brand a i {
    display: none;
}

.navbar-brand small {
    display: inline-flex;
    align-items: center;
    color: #1e466e;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.navbar-right {
    margin-left: auto;
}

#navbar-menu .nav > li > a {
    min-height: 38px;
    margin: 0 3px;
    padding: 9px 12px;
    border-radius: 12px;
    color: #40566f;
    font-weight: 600;
    transition: all .2s ease;
}

#navbar-menu .nav > li > a:hover,
#navbar-menu .nav > li.open > a {
    color: #1e466e;
    background: #eef6fc;
}

.header-unit-name {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 2px 4px 0 0;
    padding: 7px 11px;
    border: 1px solid #d8e8f5;
    border-radius: 999px;
    color: #1e466e;
    background: linear-gradient(135deg, #f8fbfe, #eef6fc);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.header-unit-name:empty {
    display: none;
}

.header-user-name {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 2px 4px 0 0;
    padding: 7px 12px;
    color: #1e466e;
    background: transparent;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .2px;
}

.header-user-name i {
    width: 22px;
    height: 22px;
    line-height: 22px;
    margin-right: 6px;
    border-radius: 50%;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(135deg, #2c5a8c, #3498db);
    font-size: 12px;
}

#navbar-menu .nav > li > a.icon-menu {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e8eef5;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(30, 70, 110, .08);
}

#navbar-menu .nav > li > a.icon-menu i {
    color: #2c5a8c;
    font-size: 18px;
}

#navbar-menu .nav > li > a.icon-menu:hover,
#navbar-menu .nav > li.open > a.icon-menu {
    background: #eef6fc;
    border-color: #d8e8f5;
}

#navbar-menu .dropdown-menu {
    margin-top: 10px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(30, 70, 110, .14);
    overflow: hidden;
}

#navbar-menu .dropdown-menu .header,
#navbar-menu .dropdown-menu .menu-heading {
    color: #1e466e;
    background: #f8fbfe;
    border-bottom: 1px solid #eef3f8;
}

#navbar-menu .dropdown-menu li a {
    color: #40566f;
    padding: 9px 16px;
}

#navbar-menu .dropdown-menu li a:hover {
    color: #1e466e;
    background: #eef6fc;
}

#main-content {
    background: #f4f7fb;
    min-height: calc(100vh - 58px);
}

#main-content .container-fluid {
    padding: 0px 15px;
}

.section-heading {
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(30, 70, 110, .06);
}

    .section-heading .section-title,
    .section-title {
        margin: 0;
        color: #001f5b;
        font-size: 24px;
        font-weight: 700;
    }

.box-content,
.panel,
.table-responsive {
    border-radius: 14px;
}

.box-content,
.panel {
    border: 1px solid #e8eef5;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(30, 70, 110, .06);
}

.form-control {
    border: 1px solid #dce6f0;
    border-radius: 8px;
    box-shadow: none;
    transition: all .2s ease;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, .12);
}

.btn-primary {
    border-color: #2c5a8c;
    background: linear-gradient(135deg, #1e466e, #2c5a8c);
    box-shadow: 0 6px 14px rgba(44, 90, 140, .18);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: #3498db;
    background: linear-gradient(135deg, #2c5a8c, #3498db);
}

.table {
    background: #ffffff;
}

.table > thead > tr > th,
.fill-head {
    color: #1e466e !important;
    background: #f8fbfe !important;
    border-bottom: 1px solid #e8eef5 !important;
    font-weight: 700;
}

footer {
    background: transparent;
    color: #7b8ca0;
    border-top: 1px solid #e8eef5;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.75rem;
    color: white;
}

.dashboard-title {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.dashboard-title i {
    margin-right: 10px;
    color: var(--secondary);
}

.dashboard-subtitle {
    opacity: 0.85;
    margin: 0;
    font-size: 15px;
}

.session-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 1.0rem 1.25rem;
    border-radius: 30px;
    font-weight: 500;
    display: inline-block;
    font-size: 14px;
}

.session-badge i {
    margin-right: 6px;
}

.welcome-name {
    color: #ffd966;
    font-weight: 700;
}

.approval-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Quick-action cards: white like the report/chart panels, with the action's
   colour carried by the icon tile and a left accent bar. Each card sets
   --ac (solid) and --ac-soft (tint) below. */
.approval-card {
    --ac: var(--primary);
    --ac-soft: #eaf1f8;
    position: relative;
    background: #fff;
    border: 1px solid #e6ecf2;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(15, 35, 60, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.approval-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ac);
}

.approval-card:hover {
    transform: translateY(-2px);
    border-color: var(--ac);
    box-shadow: 0 8px 20px rgba(15, 35, 60, 0.10);
}

/* The link fills the card so the whole tile is clickable. */
.approval-card a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 20px;
    color: #2d3b4e;
    text-decoration: none;
}

.approval-card a:hover,
.approval-card a:focus {
    color: #2d3b4e;
    text-decoration: none;
}

.approval-card a:focus-visible {
    outline: 2px solid var(--ac);
    outline-offset: -2px;
}

.approval-card .ac-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--ac-soft);
    color: var(--ac);
    font-size: 19px;
    transition: background 0.2s ease, color 0.2s ease;
}

.approval-card:hover .ac-icon {
    background: var(--ac);
    color: #fff;
}

.approval-card .ac-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.approval-card .ac-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.approval-card .ac-sub {
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 400;
    color: #7b8ca0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.approval-card .ac-arrow {
    flex: 0 0 auto;
    color: #b6c2cf;
    font-size: 13px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.approval-card:hover .ac-arrow {
    color: var(--ac);
    transform: translateX(3px);
}

.approval-card.po {
    --ac: #1e9e74;
    --ac-soft: #e5f6ef;
}

.approval-card.bill {
    --ac: #2b87d1;
    --ac-soft: #e6f1fb;
}

/* "closepo", not "close": Bootstrap's .close (dialog dismiss button) would
   otherwise apply its float/opacity rules to this card. */
.approval-card.closepo {
    --ac: #d6455d;
    --ac-soft: #fbe9ec;
}

.approval-card.absent {
    --ac: #e07b16;
    --ac-soft: #fdf0e3;
}

.report-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid #eef2f5;
}

.report-panel:hover {
    box-shadow: var(--shadow-hover);
}

.panel-header {
    background: var(--light);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e9ecef;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.panel-header h3 {
    font-weight: 600;
    margin: 0;
    color: var(--primary-dark);
}

.panel-header h3 i {
    margin-right: 8px;
    color: var(--secondary);
}

.table-reports {
    margin-bottom: 0;
}

.table-reports thead th {
    background: white;
    border-bottom: 1px solid #e9ecef;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 1rem;
}

.table-reports tbody td {
    padding: 0.6rem 1rem;
    vertical-align: middle;
    color: #495057;
    border-bottom: 1px solid #f0f2f4;
}

.table-reports tbody tr:hover {
    background-color: #f8f9fa;
}

.btn-view {
    padding: 0.2rem 0.8rem;
    font-size: 1.0rem;
    border-radius: 20px;
    background: var(--secondary);
    border: none;
    color: white;
}

.btn-view:hover {
    background: #217dbb;
    transform: scale(1.02);
}

.btn-view i {
    margin-right: 4px;
}

/* One chart per row: side by side, each panel was too narrow for seven
   full-precision value labels ("5,82,31,187") and neighbouring labels overlapped. */
.chart-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-col {
    width: 100%;
    min-width: 0;
}

.chart-wrapper {
    padding: 0.5rem 0.75rem 0.75rem;
    background: white;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 330px;
}

/* Chart panels get a lighter header than the report tables: the chart is
   the content, so the title should not out-weigh it. Scoped to .chart-col
   so report panels elsewhere keep their existing heading size. */
.chart-col .panel-header {
    background: white;
    border-bottom: 1px solid #eef2f5;
    padding: 0.9rem 1.1rem 0.75rem;
}

.chart-col .panel-header h3 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    color: #2d3b4e;
}

.chart-col .panel-header h3 i {
    font-size: 1.2rem;
}

/* ---------------------------------------------------------------------
   Dashboard charts (Monthly Sales / Monthly Purchase)

   Rendered as SVG by Chartist. Chartist's own stylesheet is NOT loaded -
   its .ct-series-a palette is red and its .ct-bar default is a 10px round
   stroke, both of which fought these rules. Everything the charts need is
   defined here instead.
   --------------------------------------------------------------------- */
.erp-chart {
    position: relative;
    display: block;
    width: 100%;
    height: 300px;
}

.erp-chart svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Chartist positions axis labels with absolutely-placed foreignObject
   spans; these are the layout rules its stylesheet would have supplied. */
.erp-chart .ct-label {
    display: block;
    fill: #94a3b8;
    color: #94a3b8;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.erp-chart .ct-label.ct-horizontal.ct-end {
    display: block;
    width: 100% !important;
    margin-left: -50%;
    padding-left: 50%;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    color: #64748b;
    fill: #64748b;
    font-size: 13px;
}

.erp-chart .ct-label.ct-vertical.ct-start {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 10px;
    text-align: right;
    color: #94a3b8;
    fill: #94a3b8;
}

/* Horizontal gridlines only - light enough to sit behind the data. */
.erp-chart .ct-grid {
    stroke: #eef2f7;
    stroke-width: 1px;
    stroke-dasharray: 0;
}

.erp-chart .ct-grids .ct-horizontal {
    stroke: none;
}

/* Flat, square-ended columns. No round linecap: that turned the bars into
   floating pills that did not meet the baseline. */
.erp-chart .ct-bar {
    stroke-width: 48px;
    stroke-linecap: butt;
    transition: stroke 0.15s ease;
}

.erp-chart--sales .ct-bar {
    stroke: #3f8fd4;
}

.erp-chart--sales .ct-bar:hover {
    stroke: #2f77b5;
}

.erp-chart--purchase .ct-bar {
    stroke: #35b978;
}

.erp-chart--purchase .ct-bar:hover {
    stroke: #2a9862;
}

/* Exact value printed above each column. */
.erp-chart .ct-bar-label {
    fill: #475569;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}

.erp-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f5 48%, #e9f4fb 100%);
}

.login-card {
    width: 100%;
    max-width: 980px;
    display: flex;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 25px 80px rgba(30, 70, 110, .18);
}

.login-brand {
    width: 45%;
    padding: 48px 42px;
    color: #fff;
    background: linear-gradient(135deg, #1e466e 0%, #2c5a8c 68%, #3498db 100%);
    position: relative;
}

.login-brand:after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -60px;
    bottom: -60px;
    border-radius: 50%;
    background: rgba(52, 152, 219, .22);
}

.brand-logo {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #fff;
    margin-bottom: 32px;
    box-shadow: 0 12px 30px rgba(30, 70, 110, .18);
}

.brand-logo img {
    max-width: 58px;
    max-height: 58px;
}

.login-brand h1 {
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.15;
}

.login-brand p {
    max-width: 310px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, .92);
    font-size: 16px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: rgba(255, 255, 255, .95);
}

.brand-feature i {
    width: 34px;
    height: 34px;
    line-height: 34px;
    border-radius: 50%;
    text-align: center;
    background: rgba(255, 255, 255, .24);
}

.login-form-panel {
    width: 55%;
    padding: 52px 56px;
}

.form-title {
    margin-bottom: 28px;
}

.form-title h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
}

.form-title span {
    color: #64748b;
    font-size: 15px;
}

.input-group-modern {
    position: relative;
    margin-bottom: 18px;
}

.input-group-modern label {
    display: block;
    color: #334155;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-group-modern .fa {
    position: absolute;
    left: 16px;
    top: 43px;
    color: #94a3b8;
}

.input-group-modern .form-control {
    height: 46px;
    padding-left: 44px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    box-shadow: none;
    transition: all .2s ease;
}

.input-group-modern select.form-control {
    padding-left: 40px;
}

.input-group-modern .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, .12);
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 24px;
    color: #64748b;
    font-size: 14px;
}

.login-options a {
    color: #2c5a8c;
    font-weight: 600;
}

.btn-login {
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e466e, #2c5a8c);
    font-weight: 700;
    letter-spacing: .6px;
    box-shadow: 0 12px 25px rgba(44, 90, 140, .28);
}

.btn-login:hover,
.btn-login:focus {
    background: linear-gradient(135deg, #2c5a8c, #3498db);
}

@media (max-width: 992px) {
    .approval-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .approval-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 1rem 1.25rem;
    }

    .dashboard-title {
        font-size: 1.3rem;
    }

    .login-card {
        display: block;
        border-radius: 18px;
    }

    .login-brand,
    .login-form-panel {
        width: 100%;
        padding: 34px 26px;
    }

    .login-brand h1 {
        font-size: 28px;
    }
}

/* Server-side validation error message shown directly below its field
   (Option-B validation migration). */
.field-error {
    display: block;
    color: #d9534f;
    font-size: 12px;
    margin-top: 2px;
}

/* Phone widths leave even a full-row chart too tight for a value label above
   every bar - the axis still carries the numbers, so hide the per-bar labels
   rather than let them overlap. Keep in step with erp-dashboard-charts.js. */
@media (max-width: 768px) {
    .erp-chart .ct-bar-label {
        display: none;
    }

    .erp-chart .ct-bar {
        stroke-width: 26px;
    }
}

/* =====================================================================================
   UI consistency fixes (Nov 2026 audit)
   ===================================================================================== */

/* Chosen drop-downs: same height, font, border and radius as .form-control (they were 25px / 13px / grey
   gradient, so two-column forms drifted out of line). */
body .chosen-container { font-size: 14px; }
body .chosen-container-single .chosen-single {
    height: 34px; line-height: 32px; padding: 0 0 0 12px;
    border: 1px solid #dce6f0; border-radius: 8px; background: #fff; box-shadow: none; color: #34495e;
}
body .chosen-container-single .chosen-single span { margin-right: 28px; }
body .chosen-container-single .chosen-single div { width: 18px; right: 6px; }   /* native sprite width: wider showed part of the next icon */
body .chosen-container-single .chosen-single div b { background-position: 0 6px; }
body .chosen-container-active.chosen-with-drop .chosen-single div b { background-position: -18px 6px; }
body .chosen-container-active .chosen-single,
body .chosen-container-active.chosen-with-drop .chosen-single {
    border-color: #3498db; background: #fff; box-shadow: 0 0 0 3px rgba(52, 152, 219, .12);
}
body .chosen-container-active.chosen-with-drop .chosen-single { border-radius: 8px 8px 0 0; }
body .chosen-container .chosen-drop { border-color: #3498db; border-radius: 0 0 8px 8px; }
body .chosen-container-single .chosen-default { color: #6c757d; }

/* Shared Add/Edit modal (#modal-3): one size and look on every master page. The dialogs were 560-600px
   wide with an inline 800px content box, so they sat off-centre and spilled out of the dialog. */
#modal-3 .modal-dialog { width: 720px; max-width: calc(100% - 20px); }
#modal-3 .modal-content { width: auto !important; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
#modal-3 .modal-header { padding: 16px 24px; border-bottom: 1px solid #e5e8ee; background: #f7f9fc; border-radius: 6px 6px 0 0; }
#modal-3 .modal-header h3, #modal-3 .modal-header h4 { margin: 0; font-size: 20px; font-weight: 600; color: #2c3e50; }
#modal-3 .modal-body { padding: 24px; }
#modal-3 .box { border: 0; box-shadow: none; margin: 0; }
#modal-3 .box .box-content { padding: 0; border: 0; }
#modal-3 .form-group > label { display: block; margin-bottom: 6px; font-weight: 600; color: #4a5568; font-size: 13px; }
#modal-3 .form-group input[type=checkbox] { margin-right: 6px; vertical-align: middle; }
#modal-3 .field-error { display: block; margin-top: 5px; color: #d9534f; font-size: 12px; }
#modal-3 .btn { min-width: 90px; }
#modal-3 label + input[type=checkbox], #modal-3 input[type=checkbox] + label { margin-left: 4px; }

/* Grid headers: centred when the grid centres its cells, and one colour (sortable headers were grey,
   plain ones navy). */
table:has(> tbody > tr[align="center"]) > tbody > tr > th[scope="col"],
table:has(> tbody > tr[style*="text-align:center"]) > tbody > tr > th[scope="col"] { text-align: center; }
.table th[scope="col"], .table th[scope="col"] a { color: #1e466e !important; }

/* Grid rows with text boxes / drop-downs: keep text and controls on one line. */
.table > tbody > tr > td { vertical-align: middle; }

/* Submit buttons placed in a lone column inside .form-group were indented 15px from the fields. */
.form-group > [class*="col-lg-2"]:only-child { padding-left: 0; }

/* Footer: no stub border at the right edge. */
footer { border-top: 0; }

/* Login / register: the decorative circle stays inside the blue panel. */
.login-brand { overflow: hidden; }

/* Login / register text brand (replaces the previous company's logo image). */
.brand-logo:has(.brand-logo-text) { width: auto; height: auto; background: transparent; box-shadow: none; justify-content: flex-start; }
.brand-logo-text { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #1e466e; font-weight: 800; letter-spacing: 1px; font-size: 18px; padding: 12px 20px; border-radius: 14px; white-space: nowrap; box-shadow: 0 12px 30px rgba(30, 70, 110, .18); }
.brand-logo-text .fa { color: #2a78d6; }

/* Inline grid edit rows: text boxes share the row instead of one fixed-width box squeezing the rest. */
.table tr td .form-control { min-width: 110px; }

/* Employee Attendance Adjustment: "Add Shift" is a quiet secondary action, not 31 bright green bars. */
#main-content .mid-add.btn-success { background: #fff; color: #1e7a4a; border: 1px dashed #9fd3b4; box-shadow: none; text-shadow: none; }
#main-content .mid-add.btn-success:hover, #main-content .mid-add.btn-success:focus { background: #eefaf2; color: #155d38; border-style: solid; }

/* Lock Attendance: keep the column header visible while the day list scrolls. */
.lock-grid thead th { position: sticky; top: 0; z-index: 2; background: #f8fbfe; box-shadow: inset 0 -1px 0 #e8eef5; }

/* Adjacent buttons never touch (several pages had Search/Export or Change/Disable flush together). */
.btn + .btn, .btn + input.btn, input.btn + .btn, input.btn + input.btn { margin-left: 6px; }
.btn-group > .btn + .btn, .input-group-btn > .btn + .btn { margin-left: -1px; }

/* Icons in front of field labels (e.g. Check Attendance filters) need a little space. */
label > i.fa:first-child { margin-right: 5px; }

/* =====================================================================================
   COLOURFUL THEME (Nov 2026)
   Colours only - no layout or behaviour changes. Every rule above stays as it was; this block
   overrides the pale white / navy colours. To go back to the old look, delete from this banner
   to the end of the file.
   ===================================================================================== */
:root {
    --c-ink: #1e1b4b;           /* headings */
    --c-indigo: #4f46e5;
    --c-violet: #7c3aed;
    --c-bg: #f5f4ff;            /* page background: a soft lavender instead of grey-blue */
    --c-line: #e9e7fb;          /* card and table borders */
    --grad-brand: linear-gradient(120deg, #4338ca 0%, #6d28d9 55%, #be185d 100%);
    --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --grad-sidebar: linear-gradient(180deg, #1e1b4b 0%, #2e1065 100%);
}

body, #wrapper, #main-content { background: var(--c-bg); }
body { color: #334155; }

/* ---------- Top bar: brand gradient, white text ---------- */
.navbar.navbar-default.navbar-fixed-top {
    background: var(--grad-brand);
    border-bottom: 0;
    box-shadow: 0 6px 20px rgba(67, 56, 202, .25);
}
.btn-toggle-offcanvas { color: #fff; background: rgba(255, 255, 255, .16); box-shadow: none; }
.btn-toggle-offcanvas:hover { color: #fff; background: rgba(255, 255, 255, .28); box-shadow: none; }
.navbar-brand a,
.navbar-brand a:hover { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); box-shadow: none; }
.navbar-brand a:hover { background: rgba(255, 255, 255, .22); }
.navbar-brand small { color: #fff; }
.header-unit-name { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.header-user-name { color: #fff; }
.header-user-name i { background: linear-gradient(135deg, #f59e0b, #ec4899); }
#navbar-menu .nav > li > a.icon-menu { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); box-shadow: none; }
#navbar-menu .nav > li > a.icon-menu i { color: #fff; }
#navbar-menu .nav > li > a.icon-menu:hover,
#navbar-menu .nav > li.open > a.icon-menu { background: rgba(255, 255, 255, .3); border-color: rgba(255, 255, 255, .45); }
#navbar-menu .dropdown-menu .menu-heading { color: #7c3aed; background: transparent; border-bottom: 0; }
#navbar-menu .dropdown-menu li a:hover { color: #3730a3; background: #eef2ff; }

/* ---------- Sidebar: deep indigo, one colour per module ---------- */
#left-sidebar.sidebar {
    background: var(--grad-sidebar);
    border-right: 0;
    box-shadow: 4px 0 24px rgba(30, 27, 75, .25);
}
#left-sidebar .btn-toggle-fullwidth { background: linear-gradient(135deg, #f59e0b, #ec4899); box-shadow: 0 6px 14px rgba(236, 72, 153, .35); }
.sidebar-search input { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
.sidebar-search input::placeholder { color: #a5b4fc; }
.sidebar-search input:focus { background: rgba(255, 255, 255, .12); border-color: #a78bfa; }

/* --mi: icon tile gradient, --ma: accent (bars, dots), --ms: selected page (dark enough for white text) */
#main-menu { --mi: linear-gradient(135deg, #818cf8, #4f46e5); --ma: #818cf8; --ms: linear-gradient(135deg, #4f46e5, #4338ca); }
#main-menu > li:first-child { --mi: linear-gradient(135deg, #38bdf8, #2563eb); --ma: #38bdf8; --ms: linear-gradient(135deg, #2563eb, #1d4ed8); }
#DivMaster  { --mi: linear-gradient(135deg, #2dd4bf, #0d9488); --ma: #2dd4bf; --ms: linear-gradient(135deg, #0d9488, #0f766e); }
#DivPayroll { --mi: linear-gradient(135deg, #fbbf24, #ea580c); --ma: #fbbf24; --ms: linear-gradient(135deg, #ea580c, #c2410c); }
#DivHR      { --mi: linear-gradient(135deg, #f472b6, #db2777); --ma: #f472b6; --ms: linear-gradient(135deg, #db2777, #be185d); }
#DivUsers   { --mi: linear-gradient(135deg, #a78bfa, #7c3aed); --ma: #a78bfa; --ms: linear-gradient(135deg, #7c3aed, #6d28d9); }

#main-menu.metismenu li a { color: #c7d2fe; }
#main-menu.metismenu > li > a i,
#main-menu.metismenu > li > a:hover i,
#main-menu.metismenu > li.active > a i,
#main-menu.metismenu > li.mm-active > a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #fff;
    font-size: 15px;
    background: var(--mi);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
#main-menu.metismenu li a:hover,
#main-menu.metismenu li.active > a,
#main-menu.metismenu li.mm-active > a {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border-color: transparent;
    box-shadow: none;
}
#main-menu.metismenu > li.active > a,
#main-menu.metismenu > li.mm-active > a {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .06);
    box-shadow: inset 3px 0 0 var(--ma);
}
#main-menu.metismenu .arrow { color: #818cf8; }
#main-menu.metismenu li.active > a .arrow,
#main-menu.metismenu li.mm-active > a .arrow { color: #fff; }

#main-menu.metismenu .submenu {
    background: rgba(0, 0, 0, .18);
    border-left: 2px solid var(--ma);
    box-shadow: none;
}
#main-menu.metismenu .submenu li a { color: #c7d2fe; }
#main-menu.metismenu .submenu li a:before { background: rgba(199, 210, 254, .45); }
#main-menu.metismenu .submenu li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border-color: transparent;
    box-shadow: none;
}
#main-menu.metismenu .submenu li a:hover:before { background: var(--ma); }
#main-menu.metismenu .submenu li.active > a {
    color: #fff;
    background: var(--ms);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
#main-menu.metismenu .submenu li.active > a:before { background: #fff; }

/* ---------- Page heading card: gradient accent bar, coloured action buttons ---------- */
.section-heading {
    border-color: var(--c-line);
    background: linear-gradient(180deg, #4f46e5, #db2777) left top / 6px 100% no-repeat, #fff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, .08);
}
.section-heading .section-title,
.section-title { color: var(--c-ink); }
/* Icon-only header links: <a class="right"><i class="fa ..."></i></a>, or a LinkButton that is itself
   the icon (class="btn btn-circle fa fa-plus right"), sometimes inside an UpdatePanel div. */
.section-heading a.right:is(.fa, :has(> i.fa:only-child)) {
    width: 34px;
    height: 34px;
    line-height: 34px;
    margin-left: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    text-align: center;
    font-size: 14px;
    color: #fff;
    background: var(--grad-primary);
    box-shadow: 0 6px 14px rgba(79, 70, 229, .25);
    transition: transform .15s ease;
}
.section-heading a.right:is(.fa-plus, :has(> i.fa-plus:only-child)) { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 14px rgba(5, 150, 105, .28); }
.section-heading a.right:is(.fa-repeat, .fa-refresh, :has(> i.fa-repeat:only-child), :has(> i.fa-refresh:only-child)) { background: linear-gradient(135deg, #38bdf8, #0284c7); box-shadow: 0 6px 14px rgba(2, 132, 199, .28); }
.section-heading a.right:is(.fa, :has(> i.fa:only-child)):hover,
.section-heading a.right:is(.fa, :has(> i.fa:only-child)):focus { color: #fff; transform: translateY(-1px); }

/* Form sub-headings written with an inline navy underline (Add Employee). */
#main-content h4[style*="#001f5b"] {
    color: #4338ca !important;
    border-bottom: 0 !important;
    background: linear-gradient(90deg, #4f46e5, #db2777 60%, transparent) left bottom / 100% 2px no-repeat;
}

/* ---------- Cards and forms ---------- */
.box-content,
.panel { border-color: var(--c-line); box-shadow: 0 8px 24px rgba(79, 70, 229, .07); }
.panel-default > .panel-heading { color: #3730a3; background: #eef2ff; border-color: var(--c-line); }
.form-control { border-color: #dcd9f5; }
.form-control:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
body .chosen-container-single .chosen-single { border-color: #dcd9f5; }
body .chosen-container-active .chosen-single,
body .chosen-container-active.chosen-with-drop .chosen-single { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
body .chosen-container .chosen-drop { border-color: #8b5cf6; }
body .chosen-container .chosen-results li.highlighted { color: #fff; background: var(--grad-primary); }

/* ---------- Buttons ---------- */
.btn-primary { color: #fff; border-color: #5b45e8; background: var(--grad-primary); box-shadow: 0 6px 14px rgba(79, 70, 229, .28); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary:active:focus {
    color: #fff; border-color: #5b21b6; background: linear-gradient(135deg, #4338ca, #6d28d9);
}
.btn-success { color: #fff; border-color: #059669; background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 6px 14px rgba(5, 150, 105, .25); }
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success:active:focus {
    color: #fff; border-color: #047857; background: linear-gradient(135deg, #059669, #065f46);
}
.btn-danger { color: #fff; border-color: #e11d48; background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 6px 14px rgba(225, 29, 72, .25); }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger:active:focus {
    color: #fff; border-color: #be123c; background: linear-gradient(135deg, #e11d48, #9f1239);
}
.btn-warning { color: #fff; border-color: #ea580c; background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 6px 14px rgba(234, 88, 12, .25); }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning:active:focus {
    color: #fff; border-color: #c2410c; background: linear-gradient(135deg, #d97706, #c2410c);
}
.btn-info { color: #fff; border-color: #0284c7; background: linear-gradient(135deg, #06b6d4, #0369a1); box-shadow: 0 6px 14px rgba(2, 132, 199, .25); }
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info:active:focus {
    color: #fff; border-color: #0369a1; background: linear-gradient(135deg, #0891b2, #075985);
}
.btn-default { color: #4338ca; border-color: #c7d2fe; background: #fff; }
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default:active:focus { color: #3730a3; border-color: #a5b4fc; background: #eef2ff; }

/* Status labels as soft coloured pills (Active / Inactive etc.). */
.label { border-radius: 999px; padding: .3em .75em; font-weight: 700; }
.label-success { color: #15803d; background: #dcfce7; }
.label-danger  { color: #be123c; background: #ffe4e6; }
.label-warning { color: #b45309; background: #fef3c7; }
.label-info    { color: #0369a1; background: #e0f2fe; }
.label-primary { color: #4338ca; background: #e0e7ff; }
.label-default { color: #475569; background: #f1f5f9; }

/* ---------- Grids: coloured header row, lavender hover ---------- */
.table > thead > tr > th,
.table > tbody > tr > th[scope="col"],
.table tr.fill-head > th,
.fill-head {
    color: #fff !important;
    background: linear-gradient(180deg, #5b50f0 0%, #4f46e5 100%) !important;
    border-color: rgba(255, 255, 255, .18) !important;
    border-bottom: 0 !important;
}
.table th[scope="col"] a,
.table > thead > tr > th a,
.fill-head a { color: #fff !important; }
.table-bordered,
.table-bordered > tbody > tr > td,
.table-bordered > thead > tr > td,
.table-bordered > tfoot > tr > td { border-color: var(--c-line); }
.table-hover > tbody > tr:hover > td { background-color: #f3f1ff; }
.table-striped > tbody > tr:nth-of-type(odd) > td { background-color: #faf9ff; }
.lock-grid thead th { box-shadow: none; }

body .GridPager a { color: #4f46e5; background: #fff; border-color: #c7d2fe; box-shadow: none; text-shadow: none; }
body .GridPager span { color: #fff; background: var(--grad-primary); border-color: #4f46e5; box-shadow: 0 4px 10px rgba(79, 70, 229, .3); text-shadow: none; }

/* ---------- Pop-up dialogs ---------- */
.modal-header { background: var(--grad-brand); border-bottom: 0; border-radius: 6px 6px 0 0; }
.modal-header .modal-title,
.modal-header h3,
.modal-header h4,
#modal-3 .modal-header h3,
#modal-3 .modal-header h4 { color: #fff; }
.modal-header .modal-title small { color: rgba(255, 255, 255, .8); }
/* Master pages repeat a #modal-3 style block in their own markup (white header), hence the extra .modal. */
#modal-3.modal .modal-header { background: var(--grad-brand); border-bottom: 0; }
#modal-3.modal .modal-header h3,
#modal-3.modal .modal-header h4 { color: #fff; }
.modal-header .close { color: #fff; opacity: .85; text-shadow: none; }
.modal-header .close:hover { color: #fff; opacity: 1; }

/* ---------- Dashboard ---------- */
.dashboard-header {
    position: relative;
    overflow: hidden;
    background: var(--grad-brand);
    box-shadow: 0 12px 30px rgba(109, 40, 217, .28);
}
.dashboard-header::before,
.dashboard-header::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .10); pointer-events: none; }
.dashboard-header::before { width: 220px; height: 220px; right: 18%; top: -120px; }
.dashboard-header::after { width: 160px; height: 160px; right: -40px; bottom: -80px; background: rgba(251, 191, 36, .22); }
.dashboard-header > .row { position: relative; z-index: 1; }
.dashboard-title i { color: #fde68a; }
.welcome-name { color: #fde047; }
.session-badge { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); }

/* Key-figure tiles: a gradient each (tiles are drawn by erp-dashboard-viz.js in this order:
   employees, attendance, net payroll, next holiday). */
.dv-root .dv-tile {
    --t1: #2563eb;
    --t2: #4338ca;
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--t1), var(--t2));
    box-shadow: 0 10px 24px rgba(30, 27, 75, .16);
}
.dv-root .dv-tile:nth-child(2) { --t1: #0f766e; --t2: #047857; }
.dv-root .dv-tile:nth-child(3) { --t1: #ea580c; --t2: #be123c; }
.dv-root .dv-tile:nth-child(4) { --t1: #7e22ce; --t2: #a21caf; }
.dv-root .dv-tile::after { content: ""; position: absolute; right: -26px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.dv-root .dv-tile-icon { color: #fff; background: rgba(255, 255, 255, .2); }
.dv-root .dv-tile-label { color: rgba(255, 255, 255, .92); }
.dv-root .dv-tile-value { color: #fff; }
.dv-root .dv-tile-sub { color: rgba(255, 255, 255, .88); }

/* Quick-action cards: tinted background, solid colour icon. */
.approval-card { background: linear-gradient(135deg, #fff 30%, var(--ac-soft) 100%); border-color: transparent; box-shadow: 0 6px 18px rgba(30, 27, 75, .07); }
.approval-card .ac-icon { color: #fff; background: var(--ac); box-shadow: 0 6px 14px rgba(30, 27, 75, .18); }
.approval-card .ac-sub { color: #64748b; }
.approval-card.bill    { --ac: #0284c7; --ac-soft: #e0f2fe; }
.approval-card.closepo { --ac: #db2777; --ac-soft: #fce7f3; }
.approval-card.absent  { --ac: #d97706; --ac-soft: #fef3c7; }

/* Chart cards: a coloured top edge and icon per card. */
.dv-root .dv-card { --cc: #4f46e5; border: 0; border-top: 4px solid var(--cc); border-radius: 14px; box-shadow: 0 8px 24px rgba(79, 70, 229, .08); }
.dv-root #dvComposition { --cc: #db2777; }
.dv-root #dvDept { --cc: #0d9488; }
.dv-root #dvAttendance { --cc: #16a34a; }
.dv-root #dvTypes { --cc: #ea580c; }
.dv-root .dv-card:has(#dvHolidays) { --cc: #d97706; }
.dv-root .dv-card:has(#dvLeaves) { --cc: #7c3aed; }
.dv-root .dv-card-head h3 .fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 8px;
    color: #fff;
    background: var(--cc);
    font-size: 14px;
}
.dv-root .dv-tablebtn:hover,
.dv-root .dv-tablebtn:focus-visible { color: var(--cc); border-color: var(--cc); }
.dv-root .dv-card:has(#dvHolidays) .dv-date { color: #b45309; background: #fef3c7; }
.dv-root .dv-avatar { color: #fff; background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.dv-root .dv-list li:nth-child(3n+2) .dv-avatar { background: linear-gradient(135deg, #f472b6, #db2777); }
.dv-root .dv-list li:nth-child(3n+3) .dv-avatar { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.dv-root .dv-badge { color: #be185d; background: #fce7f3; }

/* Report lists: gradient header per panel, buttons to match. */
.report-panel { --rp: var(--grad-primary); overflow: hidden; border: 0; box-shadow: 0 8px 24px rgba(79, 70, 229, .08); }
.row > div:nth-child(1) > .report-panel { --rp: linear-gradient(120deg, #0d9488, #0284c7); }
.row > div:nth-child(2) > .report-panel { --rp: linear-gradient(120deg, #ea580c, #db2777); }
.report-panel .panel-header { background: var(--rp); border-bottom: 0; }
.report-panel .panel-header h3,
.report-panel .panel-header h3 i { color: #fff; }
.report-panel .table-reports > thead > tr > th { color: #64748b !important; background: #f8f7ff !important; border-bottom: 1px solid var(--c-line) !important; }
.report-panel .table-reports tbody tr:hover { background-color: #f3f1ff; }
.report-panel .btn-view { color: #fff; background: var(--rp); box-shadow: 0 4px 10px rgba(30, 27, 75, .15); }
.report-panel .btn-view:hover { color: #fff; filter: brightness(1.08); }

footer { color: #6d6a9c; }

/* Check Attendance / Salary Summary carry their own "modern" page styles in blue; match the theme. */
#main-content .filter-title { border-bottom-color: #7c3aed; }
#main-content .modern-select:focus,
#main-content .modern-input:focus,
#main-content .punch-editor-bar .modern-select { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
#main-content .btn-search { color: #fff; border-color: #5b45e8; background: var(--grad-primary); box-shadow: 0 6px 14px rgba(79, 70, 229, .25); }
#main-content .btn-search:hover { color: #fff; background: linear-gradient(135deg, #4338ca, #6d28d9); }
#main-content .btn-primary-modern { color: #fff; border-color: transparent; background: var(--grad-primary); box-shadow: 0 6px 14px rgba(79, 70, 229, .28); }
#main-content .btn-primary-modern:hover { color: #fff; background: linear-gradient(135deg, #4338ca, #6d28d9); box-shadow: 0 8px 18px rgba(79, 70, 229, .32); }
#main-content .action-icon,
#main-content .action-icons > a { color: #fff; border-color: transparent; border-radius: 50%; background: var(--grad-primary); box-shadow: 0 6px 14px rgba(79, 70, 229, .22); }
#main-content .action-icon:hover,
#main-content .action-icons > a:hover { color: #fff; background: linear-gradient(135deg, #4338ca, #6d28d9); }
#main-content .action-icon:has(> .fa-repeat),
#main-content .action-icons > a:has(> .fa-repeat) { background: linear-gradient(135deg, #38bdf8, #0284c7); box-shadow: 0 6px 14px rgba(2, 132, 199, .25); }
#main-content .punch-highlight { border-left-color: #7c3aed !important; background: #faf9ff; }

/* ---------- Login / register ---------- */
.login-page {
    background:
        radial-gradient(circle at 12% 18%, rgba(124, 58, 237, .22), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(236, 72, 153, .20), transparent 42%),
        radial-gradient(circle at 85% 12%, rgba(14, 165, 233, .18), transparent 36%),
        var(--c-bg);
}
.login-brand { background: var(--grad-brand); }
.login-brand:before { content: ""; position: absolute; width: 130px; height: 130px; right: 40px; top: -50px; border-radius: 50%; background: rgba(255, 255, 255, .10); }
.login-brand:after { background: rgba(255, 255, 255, .12); }
.login-brand > * { position: relative; z-index: 1; }
.brand-logo-text { color: #312e81; }
.brand-logo-text .fa { color: #7c3aed; }
.login-brand .brand-feature:nth-of-type(2) i { background: #f59e0b; }
.login-brand .brand-feature:nth-of-type(3) i { background: #10b981; }
.login-brand .brand-feature:nth-of-type(4) i { background: #0ea5e9; }
.form-title h2 { color: var(--c-ink); }
.input-group-modern .form-control:focus { border-color: #8b5cf6; box-shadow: 0 0 0 4px rgba(139, 92, 246, .15); }
.login-options a { color: #7c3aed; }
.btn-login { background: var(--grad-brand); box-shadow: 0 12px 25px rgba(109, 40, 217, .3); }
.btn-login:hover,
.btn-login:focus { background: linear-gradient(120deg, #3730a3 0%, #5b21b6 55%, #9d174d 100%); }

/* ---------- Licence: banner (every page + login) and the Licence page ---------- */
.lic-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(30, 27, 75, .14);
}
.lic-banner > i { flex: 0 0 auto; font-size: 18px; }
.lic-banner > span { flex: 1 1 auto; }
.lic-banner-trial  { background: linear-gradient(120deg, #4f46e5, #7c3aed); }
.lic-banner-warn   { background: linear-gradient(120deg, #c2410c, #b45309); }
.lic-banner-locked { background: linear-gradient(120deg, #be123c, #9f1239); }
.lic-banner-btn,
.lic-banner-btn:focus {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    color: #1e1b4b;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.lic-banner-btn:hover { color: #1e1b4b; background: #fde68a; text-decoration: none; }
.lic-banner-login { margin: -12px 0 20px; font-size: 13px; box-shadow: none; }

.lic-card {
    margin-bottom: 20px;
    padding: 20px 22px;
    border: 1px solid var(--c-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, .07);
}
.lic-card-title { margin: 0 0 6px; color: var(--c-ink); font-size: 18px; font-weight: 700; }
.lic-card-title .fa {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin-right: 10px; border-radius: 9px;
    color: #fff; background: var(--grad-primary); font-size: 15px;
}
.lic-help { margin: 0 0 12px; color: #64748b; }
.lic-key { font-family: Consolas, "Courier New", monospace; font-size: 13px; word-break: break-all; resize: vertical; }
.lic-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.lic-sendto { margin: 0; font-size: 13px; }
.lic-ok { display: block; margin-top: 12px; padding: 12px 14px; border-radius: 10px; color: #166534; background: #dcfce7; font-weight: 600; }
.lic-fallback { margin-top: 4px; padding: 14px 16px; border-radius: 10px; color: #7c2d12; background: #ffedd5; }
.lic-fallback p { margin: 0 0 12px; }
.lic-muted { color: #94a3b8; }
.lic-bad { color: #be123c; font-weight: 700; }
.lic-mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; word-break: break-all; }

/* Status card: coloured head per state. */
.lic-status { --ls: linear-gradient(135deg, #4f46e5, #7c3aed); padding: 0; overflow: hidden; }
.lic-status.lic-s-active { --ls: linear-gradient(135deg, #059669, #047857); }
.lic-status.lic-s-warn   { --ls: linear-gradient(135deg, #ea580c, #b45309); }
.lic-status.lic-s-locked { --ls: linear-gradient(135deg, #e11d48, #9f1239); }
.lic-status-head { display: flex; align-items: center; gap: 16px; padding: 22px; color: #fff; background: var(--ls); }
.lic-status-icon {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .2); font-size: 26px;
}
.lic-status-label { font-size: 22px; font-weight: 800; line-height: 1.2; }
.lic-status-text { margin-top: 4px; color: rgba(255, 255, 255, .92); font-size: 14px; }
.lic-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; padding: 20px 22px; }
.lic-facts dt { color: #64748b; font-weight: 600; }
.lic-facts dd { margin: 0; color: var(--c-ink); font-weight: 600; }
.lic-status > .field-error { margin: 0 22px 20px; }

/* Printing (Ctrl+P): Bootstrap prints without backgrounds, so the white header text would vanish. */
@media print {
    .table > thead > tr > th,
    .table > tbody > tr > th[scope="col"],
    .table tr.fill-head > th,
    .fill-head,
    .table th[scope="col"] a,
    .table > thead > tr > th a,
    .fill-head a { color: #000 !important; background: #fff !important; }
}
