@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
/* --- Variable --- */
:root {
    --primary-color: #001a5d;
    --Secondary-color: #ccc;
    --White-color: #fff;
    --Text-color: #4a4a4a;
    --Page-Bg: #f6f8ff;
    /* Button */
    --primary-btn-bg: #2563eb;
    --primary-btn-color: #fff;
    --secondary-btn-bg: #dedede;
    --secondary-btn-color: #1f1f1f;
    /* Font */
    --Primary-Font: "Inter", sans-serif;
    /* Shadow */
    --card-shadow: 0px 0px 10px #e4e9ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--Primary-Font);
    background-color: var(--Page-Bg);
}

img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

span {
    display: inline-block;
    vertical-align: middle;
}

p {
    margin: 0px;
}

.container {
    max-width: 1540px;
    padding: 0px 20px;
    margin: 0 auto;
}

.page {
    padding: 30px 0px;
    min-height: 78vh;
}

/* --- Header --- */
.main-header {
    background: var(--White-color);
    box-shadow: 0px 0px 3px #e1e8ff;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0px 25px;
}

.middle-title h3 {
    font-size: 18px;
    font-weight: 500;
}

.logined-user {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-image {
    width: 40px;
}

.login-content {
    font-size: 16px;
    line-height: 20px;
    color: var(--Text-color);
}

.user-name {
    font-weight: 600;
    color: rgb(50, 128, 222);
}

.logout-btn a {
    color: #ff9595;
    font-size: 14px;
    line-height: 12px;
}

    .logout-btn a:hover {
        color: #ff2727;
        cursor: pointer;
    }

/* Navbar */
.icon {
    width: 1rem;
    height: 1rem;
    stroke: #7a7a7a;
    stroke-width: 2;
    fill: none;
    position: relative;
    top: -2px;
}

.nav-bar {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu {
    flex: 1 1 auto;
}

    .nav-menu a {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        padding: 10px 10px;
        text-decoration: none;
        color: #7a7a7a;
        white-space: nowrap;
        transition: all 0.5s;
    }

        .nav-menu a:hover {
            background-color: #2563eb1f;
            color: #2563eb;
        }

            .nav-menu a:hover svg {
                stroke: #2563eb;
            }

    .nav-menu.active .nav-link {
        background-color: #eff6ff;
        border-bottom: 2px solid #2563eb;
        color: #2563eb;
    }

    .nav-menu.active .icon {
        stroke: #2563eb;
    }


nav {
    background-color: #fff;
}

/* User */
.card-wrapper {
    display: flex;
    gap: 20px;
}

.card-icon {
    padding: 12px;
    background-color: #226df8;
    width: 60px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.expire-user-wrapper .card-icon {
    padding: 10px;
    background-color: #f83f22;
}

.card-icon img {
    filter: brightness(0) invert(1);
}

.home .card {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0px 20px;
    flex: 1;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-overall {
    position: absolute;
    top: -41px;
    right: -20px;
    opacity: 0.03;
    width: 180px;
}

.card-info {
    font-size: 16px;
    color: #767676;
}

.Count {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -2%;
    font-weight: 700;
    color: #002363;
}

.card-more-info {
    margin-top: 5px;
    font-size: 14px;
    color: #686868;
    flex: 1;
}

    .card-more-info img {
        width: 10px;
        margin: 0px;
    }

footer {
    padding: 15px 0px;
    text-align: center;
    background: #e2e2e2;
}

.user-edit-checkbox {
    row-gap: 40px !important;
}

.user-checkbox-title h4 {
    font-size: 16px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 10px;
}

ul {
    list-style: none;
    padding: 0px;
    margin: 0;
}

.user-checkbox-field {
    background-color: #fff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    box-shadow: 0px 0px 3px #dbe3ff;
    height: 340px;
    overflow: auto;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin: 0px 2px 6px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Test */
.nested-field ul {
    margin-left: 15px;
    list-style: none;
    padding: 0;
}

.nested.collapsed {
    display: none;
}

.toggle-btn {
    display: inline-flex;
    width: 18px;
    cursor: pointer;
    font-size: 11px;
    transform: rotate(180deg);
    transition: transform .18s;
}

    .toggle-btn.open {
        transform: rotate(0deg);
    }

    .toggle-btn.leaf {
        display: none;
    }

.tree-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
/* Field */
.left-field {
    display: flex;
    gap: 30px;
}

.field-box {
    min-width: 0;
}

.field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
}

.flex-btn-row {
    display: flex;
    gap: 8px;
}


.card-title {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    padding: 5px 0px 15px;
    margin-bottom: 10px;
}

/* form */
.form-field-box {
    padding: 20px;
    background-color: #fff;
    box-shadow: 0px 0px 5px #cccc;
    border-radius: 5px;
}

.form-title h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.field-btn-wrapper {
    border-top: 1px solid #e2e2e2;
    margin-top: 20px;
    padding-top: 15px;
    text-align: end;
}

.user-checkbox-card {
    background: #fff;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border-radius: 5px;
}



/* User table */
.user-table table tr td:first-child,
.user-table table tr td:nth-child(11),
.user-table table tr td:nth-child(12),
.user-table table tr td:nth-child(13),
.user-table table tr td:nth-child(14) {
    text-align: center;
}

.profile-table table tr td,
.profile-table table tr th {
    text-align: center;
}

    .profile-table table tr td:nth-child(2),
    .profile-table table tr td:nth-child(3),
    .profile-table table tr td:nth-child(4),
    .profile-table table tr th:nth-child(2),
    .profile-table table tr th:nth-child(3),
    .profile-table table tr th:nth-child(4) {
        text-align: left;
    }

.page-title h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 5px solid #2563eb;
    color: #3b3b3b;
}

.page-title.title-btn {
    display: flex;
    justify-content: space-between;
}



.excel {
    background-color: #ffffff;
    color: #0d7e37;
    line-height: 28px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #094d22 !important;
    border-radius: 3px !important;
    padding: 5px 15px !important;
}

    .excel span svg {
        width: 20px;
        height: 20px;
        position: relative;
        top: -2px;
    }


/*  */
.page-acces {
    display: flex;
    gap: 5px 20px !important;
    flex-wrap: wrap;
}

    .page-acces .field-box {
        flex: 0 0 calc((100% - 4 * 20px) / 5);
    }


/* Design fixes for settings file */

/* Each field-box needs relative positioning so the error anchors under it */
.field-box {
    position: relative;
}

/* Red border on invalid field */
.input-error {
    border: 1.5px solid #e53935 !important;
    outline: none;
}

/* Error message sits below the field without pushing sibling columns */
.field-error-msg {
    position: absolute;
    left: 0;
    top: 100%;
    color: #e53935;
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
}

/* Give the form row breathing room so absolute error text isn't clipped */
#addsettings_list .flex-row {
    padding-bottom: 20px;
}


/* Pagination */

/* ── Add to your existing site.css ──────────────────────────────────────────
   Validation styles for Settings form
   ────────────────────────────────────────────────────────────────────────── */

/* Each field-box needs relative positioning so the error anchors under it */
.field-box {
    position: relative;
}

/* Red border on invalid field */
.input-error {
    border: 1.5px solid #e53935 !important;
    outline: none;
}

/* Error message sits below the field without pushing sibling columns */
.field-error-msg {
    position: absolute;
    left: 0;
    top: 100%;
    color: #e53935;
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
}

/* Give the form row breathing room so absolute error text isn't clipped */
#addsettings_list .flex-row {
    padding-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Add these CSS rules to your existing  wwwroot/css/site.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Pagination bar ──────────────────────────────────────────────────────── */
.pagination-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #444;
    border-top: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

    .pagination-bar select {
        padding: 3px 6px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 13px;
        cursor: pointer;
    }

    .pagination-bar input[type="number"] {
        width: 48px;
        padding: 3px 4px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 13px;
        text-align: center;
    }

        .pagination-bar input[type="number"]::-webkit-inner-spin-button,
        .pagination-bar input[type="number"]::-webkit-outer-spin-button {
            -webkit-appearance: none;
        }

    .pagination-bar input[type="number"] {
        -moz-appearance: textfield;
    }

.pg-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: background 0.15s;
}

    .pg-btn:hover:not(:disabled) {
        background: #f0f0f0;
    }

    .pg-btn:disabled {
        opacity: 0.35;
        cursor: default;
    }


/* ── Part Description Interchange — scrollable checkbox list ─────────────── */
.partdesc-checkbox-list {
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    padding: 4px 0;
}

.partdesc-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    transition: background 0.1s;
    user-select: none;
}

    .partdesc-row:hover {
        background: #f5f7ff;
    }

.partdesc-selectall {
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.partdesc-row input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}


/* ── Validation ──────────────────────────────────────────────────────────── */
.field-box {
    position: relative;
}

.input-error {
    border: 1.5px solid #e53935 !important;
    outline: none;
}

.field-error-msg {
    position: absolute;
    left: 0;
    top: 100%;
    color: #e53935;
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
}

#addsupplier_list .flex-row {
    padding-bottom: 20px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Add these rules to your existing site.css
   Fixes: Catalog Display trigger box + Sort field width
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Make Catalog Display trigger look identical to <select> inputs ────────── */
.multi-select-wrapper {
    position: relative;
    width: 100%;
}

.multi-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da; /* same as your other inputs */
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    min-height: 38px; /* match select height */
    box-sizing: border-box;
    user-select: none;
}

    .multi-select-trigger:hover {
        border-color: #999;
    }

.multi-select-arrow {
    font-size: 10px;
    color: #555;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Dropdown panel */
.multi-select-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
    min-width: 180px;
}

.multi-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

    .multi-select-item:hover {
        background: #e8f0fe;
        color: #1a73e8;
    }

.multi-select-all {
    font-weight: 600;
    border-bottom: 1px solid #e8e8e8;
    background: #f8f9fa;
}

.multi-select-item input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin: 0;
    accent-color: #1a73e8;
}

/* Blue highlight when item is selected */
.multi-select-item:has(input:checked) {
    background: #1a73e8;
    color: #fff;
}

    .multi-select-item:has(input:checked):hover {
        background: #1557b0;
    }


/* ── Sort field — force same width and height as other inputs ───────────────── */
#form_sortBy {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

    /* Remove spinner arrows from number input */
    #form_sortBy::-webkit-inner-spin-button,
    #form_sortBy::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

#form_sortBy {
    -moz-appearance: textfield;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Report — RDLC pixel-perfect styles
   Extracted from ReportFailedLogon.rdlc:
     Header bg:     #384c70
     Header border: #4e648a
     Data border:   #e5e5e5
     Data text:     #4d4d4d
     Font:          Tahoma
   Add to site.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── RDLC Report Header: Logo | Title (center) | Date: dd MMM yyyy (right) ── */
.rdlc-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    margin-bottom: 0;
}

.rdlc-logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.rdlc-title {
    flex: 1;
    text-align: center;
    font-family: Tahoma, sans-serif;
    font-size: 14px; /* 8pt → ~11-14px */
    font-weight: bold;
    color: #222;
    padding: 0 20px;
}

.rdlc-date {
    font-family: Tahoma, sans-serif;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

/* ── RDLC Table ───────────────────────────────────────────────────────────── */
.rdlc-table-wrapper {
    border-radius: 0;
    box-shadow: none;
    overflow: auto;
}

.rdlc-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Tahoma, sans-serif;
}

    /* Header row — exact RDLC colors: BackgroundColor=#384c70, Border=#4e648a */
    .rdlc-table thead tr {
        background-color: #384c70 !important;
    }

    .rdlc-table thead th {
        font-family: Tahoma, sans-serif;
        font-size: 14px; /* 11pt */
        font-weight: bold;
        color: #ffffff !important;
        padding: 6px 8px; /* PaddingLeft/Right 2pt */
        border: 1px solid #4e648a;
        text-align: left;
    }

    /* Data rows — border #e5e5e5, text #4d4d4d, font Tahoma 8pt */
    .rdlc-table tbody tr {
        background: #fff;
    }

        .rdlc-table tbody tr:nth-child(even) {
            background: #f9f9f9;
        }

    .rdlc-table tbody td {
        font-family: Tahoma, sans-serif;
        font-size: 12px; /* 8pt */
        color: #4d4d4d;
        padding: 5px 8px; /* PaddingLeft/Right 2pt */
        border: 1px solid #e5e5e5;
        text-align: left;
    }

/* User list table */
.table-wrapper.user-list-table {
    overflow: unset;
    max-height: unset;
}
    .table-wrapper.user-list-table table td:nth-child(2) {
        max-width: 100px;
    }

    .table-wrapper.user-list-table table td:nth-child(3) {
        max-width: 80px;
    }

    .table-wrapper.user-list-table table td:nth-child(4) {
        max-width: 80px;
    }

    .table-wrapper.user-list-table table td:nth-child(5) {
        max-width: 80px;
    }

    .table-wrapper.user-list-table table td:nth-child(6) {
        max-width: 150px;
    }

    .table-wrapper.user-list-table table td:nth-child(7) {
        max-width: 100px;
    }

    .table-wrapper.user-list-table table td:nth-child(8) {
        max-width: 80px;
    }

    .table-wrapper.user-list-table table td:nth-child(9) {
        max-width: 130px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        position: relative;
        text-align:center;
    }

    .table-wrapper.user-list-table table td:nth-child(10) {
        max-width: 80px;
    }


    .table-wrapper.user-list-table table td:nth-child(11),
    .table-wrapper.user-list-table table td:nth-child(12),
    .table-wrapper.user-list-table table td:nth-child(13),
    .table-wrapper.user-list-table table td:nth-child(14) {
        width: 40px;
        max-width: 40px;
        text-align: center;
        padding-left: 4px;
        padding-right: 4px;
    }

    .table-wrapper.user-list-table .badge.badge-public {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        display: inline-block;
        line-height: 1.6;
    }

    /* IP info icon + click panel */
    .ip-info-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        margin-left: 4px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: #2f6fed;
        color: #fff;
        cursor: pointer;
        vertical-align: middle;
        font-size: 11px;
        font-weight: 700;
        font-style: italic;
        font-family: Georgia, serif;
        transition: background .15s, transform .15s;
    }

    .ip-info-btn svg {
        display: none;
    }

    .ip-info-btn::after {
        content: "i";
    }

    .ip-info-btn:hover {
        background: #1a56c9;
        transform: scale(1.1);
    }

    .ip-panel {
        position: absolute;
        bottom: calc(100% + 8px);
        left: 0;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        min-width: 220px;
        max-width: 320px;
        max-height: 180px;
        z-index: 1100;
        box-shadow: 0 8px 24px rgba(0,0,0,.15);
        display: flex;
        flex-direction: column;
    }

    .ip-panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
        font-size: 12px;
        font-weight: 600;
        color: #333;
    }

    .ip-panel-close {
        background: none;
        border: none;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
        color: #888;
        padding: 0 4px;
        border-radius: 4px;
    }

    .ip-panel-close:hover {
        background: #f0f0f0;
        color: #333;
    }

    .ip-panel-body {
        padding: 10px 12px;
        font-size: 12px;
        color: #444;
        overflow-y: auto;
        flex: 1;
        line-height: 1.6;
        word-break: break-all;
    }
