:root {
    --primary-color: #00a99d;
    --sidebar-bg: #2d3e50;
    --sidebar-hover-bg: #34495e;
    --content-bg: #ecf0f1;
    --white-color: #ffffff;
    --text-color: #333;
    --border-color: #dde3e7;
    --active-tab-color: #2c3e50;
    --active-tab-border: var(--primary-color);
    --reminder-color: #e67e22;
    --video-button-bg: #3498db;
    --video-button-hover-bg: #2980b9;
    --expired-color: #c0392b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans Thai', sans-serif;
}

html {
    font-size: clamp(0.875rem, 0.77rem + 0.28vw, 1rem);
    -webkit-text-size-adjust: 100%;
}

body,
html {
    height: 100%;
    background-color: var(--content-bg);
    overflow: hidden;
    color: var(--text-color);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

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

/* Global Input Blocker */
#global-input-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    background-color: transparent;
    cursor: wait;
}

/* --- Login Styles --- */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--content-bg);
    padding: 1rem;
}

.login-box {
    background-color: var(--white-color);
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 25rem;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.login-header h3 {
    font-size: 1.5rem;
    color: var(--sidebar-bg);
    margin-bottom: 0.25rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .fas {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
}

.input-with-icon input {
    padding: 0.75rem 1rem 0.75rem 2.5rem !important;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.1875rem rgba(0, 169, 157, 0.15);
}

.login-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.login-btn:hover {
    background-color: #008a80;
}

.login-btn:active {
    transform: translateY(1px);
}

.dashboard-container {
    display: flex;
    height: 100vh;
    position: relative;
}

.sidebar {
    width: 15rem;
    background-color: var(--sidebar-bg);
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
}

.sidebar nav {
    flex-grow: 1;
    margin-top: 1.25rem;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    position: relative;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 1.125rem 1.5625rem;
    color: var(--white-color);
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}

.sidebar nav ul li a:hover {
    background-color: var(--sidebar-hover-bg);
}

.sidebar nav ul li a.active {
    background-color: var(--sidebar-hover-bg);
    color: var(--primary-color);
}

.sidebar nav ul li a .fas {
    font-size: 1.25rem;
    width: 1.25rem;
    text-align: center;
}

.menu-text {
    margin-left: 1.25rem;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 0.625rem 0;
}

.language-selector {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5625rem;
    color: var(--white-color);
    white-space: nowrap;
}

.language-selector .fas {
    font-size: 1.25rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.language-selector select {
    background-color: var(--sidebar-hover-bg);
    color: var(--white-color);
    border: none;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    width: 100%;
    cursor: pointer;
    margin-left: 1.25rem;
}

.language-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 0.125rem var(--primary-color);
}

.logout-button {
    display: flex;
    align-items: center;
    padding: 1.125rem 1.5625rem;
    color: var(--white-color);
    text-decoration: none;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.logout-button:hover {
    background-color: var(--sidebar-hover-bg);
}

.logout-button .fas {
    font-size: 1.25rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-collapsed .sidebar {
    width: 4.375rem;
}

.sidebar-collapsed .sidebar .menu-text {
    display: none;
}

.sidebar-collapsed .sidebar nav ul li a,
.sidebar-collapsed .sidebar .logout-button,
.sidebar-collapsed .sidebar .language-selector {
    justify-content: center;
    padding: 1.125rem 0;
}

.sidebar-collapsed .sidebar .language-selector .fas {
    display: none;
}

.sidebar-collapsed .sidebar .language-selector select {
    margin-left: 0;
    width: auto;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0 1.25rem;
    height: 3.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.3125rem;
}

.sidebar-toggle:hover {
    color: var(--sidebar-hover-bg);
}

.logo {
    display: flex;
    align-items: center;
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 0.3125rem 0.9375rem;
    border-radius: 1.25rem;
    font-weight: bold;
}

.logo span {
    margin-left: 0.5rem;
}

.logo-img {
    height: 1.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-menu span {
    margin: 0 0.625rem;
}

.user-menu .fas {
    font-size: 0.875rem;
}

.user-menu .fa-user-circle {
    font-size: 1.25rem;
}

.main-content-panel {
    padding: 1.25rem 1.875rem;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.content-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0.8rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.tab-item {
    padding: 0.6rem 1rem 0.6rem 0.65rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #7f8c8d;
    border-bottom: 0.25rem solid transparent;
    margin-bottom: -2px;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.tab-item .fas {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #7f8c8d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
}

.tab-item.active {
    color: #048f85;
    font-weight: 600;
    border-bottom-color: var(--active-tab-border);
}

.tab-item:hover {
    color: var(--active-tab-color);
}

.tab-item:hover .fas {
    background-color: #e0f2f1;
    color: var(--primary-color);
}

.tab-item.active .fas {
    background-color: var(--primary-color);
    color: var(--white-color);
}

#customer-details-tabs-container .tab-item {
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.content-header h2 {
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
    font-weight: 600;
    color: var(--text-color);
}

.content-body {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.sub-menu {
    width: 14rem;
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 0;
    flex-shrink: 0;
}

.sub-menu ul {
    list-style: none;
}

.sub-menu ul li a {
    display: block;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #7f8c8d;
    font-weight: 500;
    border-left: 0.25rem solid transparent;
    font-size: 0.95rem;
}

.sub-menu ul li a:hover {
    background-color: #f8f9fa;
    color: var(--text-color);
}

.sub-menu ul li a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: bold;
}

.sub-menu ul li.menu-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 1.25rem;
}

.submenu-mobile-header {
    display: none;
}

.data-panel {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.9375rem;
    padding: 0.4rem 0;
}

.panel-header h3 {
    font-size: clamp(1.1rem, 0.9rem + 0.5vw, 1.25rem);
    color: var(--text-color);
}

.panel-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

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

.custom-select-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0.55rem 2.5rem 0.55rem 1.25rem;
    border-radius: 5rem;
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    background-color: var(--white-color);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s;
}

.custom-select-wrapper .select-arrow {
    position: absolute;
    top: 50%;
    right: 1.125rem;
    transform: translateY(-50%);
    color: #bdc3c7;
    pointer-events: none;
    font-size: 0.75rem;
}

.custom-select-wrapper.with-icon>i:first-child {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    pointer-events: none;
}

.custom-select-wrapper.with-icon select {
    padding-left: 2.6rem;
}

.mul-sel-group {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr 2fr;
}

.search-container {
    position: relative;
}

.search-container .fas {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
}

.search-container input {
    width: 12.5rem;
    padding: 0.6rem 0.625rem 0.6rem 2.5rem;
    border-radius: 5rem;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.add-button {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    width: 2.375rem;
    height: 2.375rem;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 0.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
    flex-shrink: 0;
    line-height: initial;
}

.add-button:hover {
    background-color: #008a80;
}

.add-button.file,
.add-button.video-button {
    font-size: 0.75rem;
    margin-left: 0;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    width: 6.9rem;
    height: 1.85rem;
    text-decoration: none;
}

.video-button.play {
    background-color: var(--video-button-bg);
}

.video-button:not(.play) {
    background-color: #4d72a9;
}

.video-button:hover {
    background-color: var(--video-button-hover-bg);
}

.add-button.file i,
.add-button.video-button i {
    margin-right: 0.4rem;
    font-size: 0.8125rem;
}

.table-container {
    overflow-x: auto;
    flex-grow: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.875rem;
    text-align: left;
    font-size: 0.8rem;
    white-space: nowrap;
    vertical-align: baseline;
}

.data-table td {
    border-bottom: 1px solid #e9f1ef;
}

#device-table-body td,
#customer-table-body td {
    vertical-align: top;
}

.table-sub-text {
    font-size: 0.75rem;
    color: gray;
    margin-top: 0.2rem;
}

.note-sub-text {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    padding-left: 0.25rem;
}

.no-list {
    text-align: center !important;
    color: #7f8c8d;
    padding: 1.5rem !important;
    font-size: 0.8rem;
}

.no-doc,
.no-info-table {
    color: #999;
    font-size: 0.8rem;
}

.no-doc {
    padding-left: 3.75rem;
}

.load-table-error {
    text-align: center !important;
    color: #c0392b;
    padding: 1.5rem !important;
}

.department-list,
.access-rights-list {
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
}

.department-list li,
.access-rights-list li {
    padding-bottom: 0.25rem;
}

.department-list li:last-child,
.access-rights-list li:last-child {
    padding-bottom: 0;
}

.access-rights-list {
    column-count: 2;
    column-gap: 1.25rem;
}

.data-table th {
    background-color: #edf5f4;
    font-weight: 600;
    color: #3d7672;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr:not(.loading, :has(td[rowspan])):hover {
    background-color: #f5f9f8;
}

tr:not(.loading):has(td:not([rowspan]):hover) {
    background-color: #f5f9f8;
}

tbody:has(td:not([rowspan]):hover) td[rowspan] {
    background-color: #ffffff;
}

/* #documents-table-body tr td[rowspan]:first-child {
    padding: 0.75rem 0 0.75rem 0.5rem;
} */

#documents-table-body .setting-action-btn {
    color: #00a99d;
    font-size: 0.9rem !important;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
    border-top: 1px solid #f0f2f5;
    margin-top: auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: var(--white-color);
}

.pagination-container .total-info {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
}

.pagination-container .total-info strong {
    color: #31a99d;
    padding: 0 0.25rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-button {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: var(--white-color);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
}

.pagination-button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 1px 1px 2px 0px rgb(68 121 117 / 39%);
}

.pagination-button:disabled {
    background-color: #f8fafc;
    color: #cbd5e1;
    border-color: #f1f5f9;
    cursor: not-allowed;
}

.page-info-group {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0 0.5rem;
}

.pagination-text {
    font-size: 0.875rem;
    color: #64748b;
}

.pagination-container .page-input {
    width: 3rem;
    text-align: center;
    padding: 0.4rem 0.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.2s;
    background-color: #fff;
    -moz-appearance: textfield;
}

.pagination-container .page-input::-webkit-outer-spin-button,
.pagination-container .page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.total-pages-text {
    font-size: 0.875rem;
    color: #64748b;
    white-space: nowrap;
}

.loading td {
    text-align: center;
    padding: 4rem;
    border: 0;
}

.loading i {
    font-size: 3.25rem;
    color: #00a99d;
}

.loading-text {
    margin-top: 1.5rem;
    color: #7f8c8d;
    letter-spacing: 0.02rem;
    font-size: 0.925rem;
}

.loading:has(.blank) {
    display: flex;
}

.loading .blank {
    margin: auto;
    text-align: center;
}

#search-results-modal .pagination-container {
    padding: 0.5rem 2rem 1.25rem;
}

.results-header {
    display: flex;
    align-items: baseline;
}

#start-work-type {
    background-color: var(--white-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.625rem 2.5rem 0.625rem 1.5625rem;
    margin-left: 0;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2300a99d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em 0.75em;
}

#start-work-type:focus {
    outline: none;
}

.result-btm {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.sub-text {
    margin-left: 0.75rem;
    font-size: 0.875rem;
    color: #7f8c8d;
}

.panel-header-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.9375rem;
}

.panel-header-full .panel-header-title h2 {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    color: var(--text-color);
    padding-left: 0.25rem;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: nowrap;
    margin-left: auto;
}

.filter-bar .search-container,
.filter-bar .add-button {
    flex-shrink: 0;
}

.filterable-header {
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filterable-header:hover {
    background-color: #f0f3f5;
}

.filterable-header.active {
    color: var(--primary-color);
}

.filterable-header .fa-chevron-down {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.filterable-header.open .fa-chevron-down {
    transform: rotate(180deg);
}

.th-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    z-index: 110;
    list-style: none;
    padding: 0.5rem 0;
    min-width: 12.5rem;
    max-height: 18.75rem;
    overflow-y: auto;
}

.th-filter-dropdown ul {
    list-style: none;
}

.th-filter-dropdown ul li {
    padding: 0.55rem 1.25rem;
    font-size: 0.825rem;
    font-weight: normal;
    color: var(--text-color);
    white-space: nowrap;
    transition: background-color 0.2s;
    cursor: pointer;
}

.th-filter-dropdown ul li:hover {
    background-color: #f8f9fa;
}

.th-filter-dropdown ul li.active {
    font-weight: bold;
    color: var(--primary-color);
}

.th-filter-icon {
    font-size: 0.75rem;
    margin-right: 0.35rem;
    color: var(--primary-color);
}

.data-panel-full {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    flex-grow: 1;
    overflow: hidden;
    padding: 1.25rem 1.25rem 0.25rem;
    display: flex;
    flex-direction: column;
}

.tab-panel:not(.content-body) {
    display: flex;
    flex-direction: column;
    overflow: auto;
    flex-grow: 1;
}

.action-menu-cell {
    position: relative;
    text-align: center !important;
    width: 1%;
}

.action-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #7f8c8d;
    padding: 0.3125rem;
}

.action-menu-toggle:hover {
    color: var(--text-color);
}

.action-menu-dropdown {
    position: absolute;
    left: 1.5rem;
    top: 3rem;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    z-index: 100;
    list-style: none;
    padding: 0.5rem 0;
    min-width: 13.75rem;
}

.action-menu-dropdown li a {
    display: block;
    padding: 0.625rem 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.875rem;
    white-space: nowrap;
}

.action-menu-dropdown li a:hover {
    background-color: #f8f9fa;
}

.action-menu-dropdown li a .fas {
    margin-right: 0.75rem;
    width: 1rem;
    text-align: center;
    color: #95a5a6;
}

.due-date-reminder {
    color: var(--reminder-color);
    font-weight: bold;
}

.due-date-reminder .fas {
    margin-right: 0.375rem;
}

.status-box {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-normal {
    background-color: #d4edda;
    color: #155724;
}

.status-maintenance {
    background-color: #fff3cd;
    color: #856404;
}

.status-calibration {
    background-color: #cce5ff;
    color: #004085;
}

.status-in-use {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-ready-to-use {
    background-color: #d4edda;
    color: #155724;
}

.status-old-version {
    background-color: #f8d7da;
    color: #721c24;
}

.status-effective {
    background-color: #d4edda;
    color: #155724;
}

.status-expire {
    background-color: #f8d7da;
    color: #721c24;
}

.status-claim {
    background-color: #fff3cd;
    color: #856404;
}

.status-cancel {
    background-color: #e9ecef;
    color: #495057;
}

.status-progress-maintenance {
    background-color: #fff3cd;
    color: #856404;
}

.status-progress-calibration {
    background-color: #cce5ff;
    color: #004085;
}

.status-progress-finish {
    background-color: #d4edda;
    color: #155724;
}

.status-progress-cancel {
    background-color: #e9ecef;
    color: #495057;
}


.document-file-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 6.9rem;
}

.document-material-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.view-documents-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #3498db;
    padding: 0 0.3125rem;
}

.view-documents-btn:hover {
    color: #2980b9;
}

.brand-document-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
    white-space: normal;
}

.brand-document-list li {
    padding-bottom: 0.5rem;
    white-space: nowrap;
}

.brand-document-list li:last-child {
    padding-bottom: 0;
}

.brand-document-list li .document-name {
    font-weight: 500;
}


.file-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.265rem 0.5rem;
    border-radius: 0.3125rem;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
    width: 100%;
    line-height: initial;
}

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

.pdf-link {
    background-color: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

#profile-content {
    flex-direction: column;
}

.profile-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    height: 100%;
}

.profile-loader i {
    font-size: 2.75rem;
    color: var(--primary-color);
}

.profile-loader .blank {
    text-align: center;
}

.profile-main-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
}

.user-details-container {
    width: 100%;
    border-radius: 0.5rem;
    padding: 1.5rem 1.875rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
}

.user-details-container h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 1.5625rem;
    flex-shrink: 0;
}

.user-details-form {
    display: grid;
    grid-template-columns: 16.25rem 1fr;
    grid-template-areas: "photo details";
    gap: 1.875rem 3.125rem;
    align-items: start;
    margin: 1.25rem auto 0;
    width: 100%;
    max-width: 51.25rem;
    overflow: auto;
    padding: 0 0.5rem;
}

.user-details-photo-section {
    grid-area: photo;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.user-details-photo-section .profile-photo {
    width: 12.5rem;
    height: 12.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 0.3125rem solid var(--white-color);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.profile-photo-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12.25rem;
    height: 12.25rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.user-details-photo-section:hover .profile-photo-overlay {
    opacity: 1;
}

.photo-action-btn {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--sidebar-bg);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.photo-action-btn:hover {
    background-color: var(--white-color);
}


.user-details-info-section {
    grid-area: details;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    overflow-y: auto;
    padding: 0 1rem 0.5rem;
}

.info-section-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-section-group h4 {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.info-section-group h4 .fas {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    max-width: 28.125rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: var(--white-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.form-field input:disabled,
select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 100%;
}

.form-field .custom-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 28.125rem;
}

.form-field .custom-select-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
}


.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.9375rem;
    padding-top: 1.25rem;
    border-top: 1px solid #d8edeb;
    margin-top: 1.25rem;
    flex-shrink: 0;
}

.form-actions.user {
    display: flex;
    justify-content: end;
    padding: 1rem;
    background-color: #dfedec;
    margin-bottom: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.form-action-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-action-btn.update-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    /* margin-right: 0.75rem; */
}

.form-action-btn.update-btn:hover {
    background-color: #008a80;
}

.form-action-btn.reset-btn {
    background-color: #ffffff;
    color: #495057;
}

.form-action-btn.reset-btn:hover {
    background-color: #ced4da;
}

#management-content .panel-header {
    padding: 0.4rem 1rem 0;
    margin-bottom: 0;
}

#management-content .panel-header h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    padding-left: 0.625rem;
}

#management-content table td {
    vertical-align: middle;
}

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
}

.user-table-photo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.contact-info-cell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #495057;
}

.contact-info-item .fas {
    width: 1rem;
    text-align: center;
    color: #95a5a6;
}

.contact-info-item span {
    line-height: 1.2;
}

.setting-actions {
    text-align: left;
    white-space: nowrap;
    width: 1%;
}

.setting-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    color: #7f8c8d;
    transition: color 0.2s;
}

.setting-action-btn.edit-btn:hover {
    color: var(--primary-color);
}

.setting-action-btn.delete-btn:hover {
    color: #e74c3c;
}

.setting-action-btn.doc-btn:hover {
    color: #3498db;
}

.text-capitalize {
    text-transform: capitalize;
}

.setting-other-group {
    margin-bottom: 1.5rem;
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.setting-other-info {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.setting-other-info button {
    margin: 0;
}

.setting-form-container {
    padding-top: 1rem;
    max-width: 45rem;
    margin: 0 auto;
    flex-grow: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    background-color: #000;
    border-radius: 0.5rem;
    box-shadow: 0 0.3125rem 1.25rem rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 60rem;
    aspect-ratio: 16 / 9;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .video-modal-content {
    transform: scale(1);
}

.video-modal-close,
.modal-content-close {
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.video-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    color: var(--white-color);
    font-size: 2.25rem;
    z-index: 1;
}

.video-modal-close:hover {
    color: #ccc;
}

#video-player {
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

#delete-confirm-modal-content,
#delete-success-modal-content,
#logout-confirm-modal-content {
    background-color: var(--white-color);
    color: var(--text-color);
    width: 90%;
    max-width: 25rem;
    aspect-ratio: auto;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.1);
}

#delete-confirm-modal-content h3,
#delete-success-modal-content h3,
#logout-confirm-modal-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0;
}

.delete-confirm-icon,
.delete-success-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.delete-confirm-icon {
    background-color: #fef2f2;
    color: #ef4444;
}

.delete-success-icon {
    background-color: #f0fdf4;
    color: #22c55e;
}

.delete-confirm-text {
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-width: 90%;
}

.delete-confirm-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.delete-confirm-modal-footer .form-action-btn {
    justify-content: center;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    white-space: nowrap;
}

.delete-confirm-modal-footer .form-action-btn.reset-btn {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.delete-confirm-modal-footer .form-action-btn.reset-btn:hover {
    background-color: #f8f9fa;
}

.form-action-btn.delete-btn-confirm {
    background-color: #e74c3c;
    border: 1px solid #e74c3c;
    color: var(--white-color);
}

.form-action-btn.delete-btn-confirm:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

.delete-success-modal-footer {
    display: flex;
    width: 100%;
    margin-top: 1rem;
}

.delete-success-modal-footer .form-action-btn {
    justify-content: center;
    width: 50%;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    margin: auto;
}

#device-details-modal-content,
#customer-details-modal-content {
    background-color: #f8fafc;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 90vh;
    max-height: 56.25rem;
    width: 95%;
    max-width: 76rem;
    aspect-ratio: auto;
    border-radius: 0.5rem;
    overflow: hidden;
}

.device-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    flex-shrink: 0;
}

.breadcrumb {
    font-size: 1.125rem;
    font-weight: 600;
    color: #94a3b8;
}

.breadcrumb span {
    color: var(--sidebar-bg);
}

.device-details-body-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
}

.details-left-pane,
.details-right-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.details-left-pane-content {
    overflow-y: auto;
    padding: 1.25rem;
}

.details-left-pane {
    border-right: 1px solid var(--border-color);
}

.device-photo-container {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}

#detail-device-photo,
#customer-detail-photo {
    width: 8rem;
    height: 8rem;
    border-radius: 100%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.details-section {
    background-color: var(--white-color);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.details-section:last-child {
    margin-bottom: 0;
}

.details-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border-color);
}

.details-section-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

#customer-details-modal .details-left-pane {
    padding: 1.25rem;
}

#customer-details-modal .details-section {
    flex-grow: 1;
    overflow: auto;
}

.cus-profile {
    margin-bottom: 0.5rem;
}

.cus-name {
    padding-top: 0.75rem;
    font-weight: bold;
    color: #00a99d;
}

.section-actions {
    display: flex;
    gap: 0.3125rem;
}

.info-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.3rem 0;
    line-height: 1.6;
    word-break: break-word;
}

.info-item.vertical {
    flex-direction: column;
    align-items: flex-start;
}

.info-item .info-value {
    text-align: right;
}

.info-box {
    padding: 0.5rem 1.65rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.info-box .info-item {
    justify-content: unset;
}

.info-label {
    color: #7f8c8d;
    white-space: nowrap;
    margin-right: 0.8rem;
}

.po-document-link {
    color: var(--primary-color);
    margin-left: 0.5rem;
    text-decoration: none;
}

.po-document-link:hover {
    text-decoration: underline;
}

.quota-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
}

#detail-quota-list {
    padding-left: 1.5rem;
    width: 100%;
}

#detail-quota-list li>div {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.quota-expires {
    font-size: 0.75rem;
    color: #7f8c8d;
    white-space: nowrap;
}

.view-users-button {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.view-users-button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

#details-documents .table-container {
    max-height: 12.5rem;
}

#details-documents .data-table th,
#details-documents .data-table td {
    font-size: 0.8125rem;
    padding: 0.5rem 0.625rem;
    white-space: normal;
}

.details-right-pane {
    padding: 1.25rem;
}

.status-summary-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.375rem, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.status-item {
    background-color: var(--white-color);
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 1rem;
}

.status-label {
    display: block;
    color: #7f8c8d;
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
}

.status-value {
    font-size: 1.1rem;
    font-weight: bold;
}

.status-expired {
    color: var(--expired-color);
}

.status-due-soon {
    color: var(--reminder-color);
}

.history-box {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
}

.history-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    flex-shrink: 0;
}

.history-header h3 {
    font-size: 1.1rem;
}

.history-header-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

#history-search-input {
    width: 11.25rem;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
}

.history-header-actions .search-container .fas {
    left: 0.625rem;
}

.history-box .table-container {
    padding: 0;
}

.history-box .data-table th,
.history-box .data-table td {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.history-box .pagination-container {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.customer-details-tab-panel .pagination-container {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
}

#document-modal-content {
    background-color: var(--white-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    height: 65vh;
    max-height: 37.5rem;
    width: 90%;
    max-width: 46rem;
    aspect-ratio: auto;
}

.document-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.9375rem;
    margin-bottom: 0.9375rem;
    flex-shrink: 0;
}

.document-modal-header h3 {
    font-size: 1.125rem;
}

.document-modal-body {
    overflow-y: auto;
    flex-grow: 1;
}

.document-modal-body .data-table td,
.document-modal-body .data-table th {
    white-space: normal;
}

.modal-content-bg {
    background-color: var(--white-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 90%;
    max-width: 31.25rem;
    aspect-ratio: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.3125rem 1.25rem rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-content-bg {
    max-height: 90%;
}

.modal-header {
    background-color: #f8f9fa;
    padding: 0.9375rem 1.5625rem;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sidebar-bg);
}

.modal-header h3 .fas {
    margin-right: 0.625rem;
    color: var(--primary-color);
}

.modal-content-close {
    position: static;
    font-size: 1.75rem;
    color: #7f8c8d;
}

.modal-content-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 0 2.5rem 2rem;
    margin-top: 1.2rem;
    overflow: auto;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-field label:not(.file-upload-label):not(.custom-checkbox-container) {
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #7f8c8d;
    padding-left: 0.25rem;
}

.modal-body form .form-field select,
.modal-body form .form-field input,
.modal-body form .form-field textarea {
    padding: 0.625rem 0.95rem;
    border: 1px solid var(--border-color);
}

.modal-body form .form-field select {
    padding-right: 2.75rem;
}

.modal-body form .form-field input:not([type='checkbox'], [type='radio']):focus,
.modal-body form .form-field select:focus,
.modal-body form .form-field textarea:focus,
.accordion-search-input:focus,
input:not([type='checkbox'], [type='radio']):focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0.1rem 0.1rem rgb(7 149 138 / 42%);
    border-color: #bcd8d6ab;
}

.custom-file-upload {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--white-color);
    overflow: hidden;
}

.custom-file-upload:has(input:focus-visible) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.1875rem rgba(0, 169, 157, 0.15);
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.635rem 0.9375rem;
    background-color: #ffffff;
    color: #495057;
    cursor: pointer;
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.file-upload-label:hover {
    background-color: #e9ecef;
}

.file-upload-label .fas,
.file-upload-label span {
    color: var(--primary-color);
}

.file-upload-filename {
    padding: 0.635rem 0.9375rem;
    font-size: 0.875rem;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.delete-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #e74c3c;
    padding: 0 0.9375rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border-color);
    transition: background-color 0.2s;
    align-self: stretch;
}

.delete-file-btn:hover {
    background-color: #fde8e8;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.device-list-entry {
    display: grid;
    grid-template-columns: 1fr 2rem;
    gap: 0.6rem;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.device-list-entry .form-field {
    flex-direction: row;
    align-items: baseline;
    flex-grow: 1;
}

.device-list-entry label {
    margin-right: 0.6rem;
    white-space: nowrap;
}

.add-entry-btn {
    color: var(--text-color);
    justify-content: center;
    padding: 0.625rem 1.5rem;
}

.modal-body form .form-field .custom-select-wrapper,
.modal-body form .form-field .custom-select-wrapper select {
    width: 100%;
}

.customer-modal-header {
    display: flex;
}

.customer-modal-header .form-field {
    width: 50%;
}

.modal-photo-upload {
    align-items: center;
}

.modal-photo-upload .modal-photo-container {
    position: relative;
    width: 10rem;
    height: 10rem;
}

.modal-photo-container .profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-photo-container .profile-photo-overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.modal-photo-upload:hover .profile-photo-overlay {
    opacity: 1;
}

#add-user-form,
#add-customer-form,
#import-device-form {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "photo"
        "details";
    gap: 1.5rem;
    align-items: start;
}

#add-user-form .modal-photo-upload,
#add-customer-form .modal-photo-upload,
#import-device-form .modal-photo-upload {
    grid-area: photo;
    justify-self: center;
}

.details-fields {
    grid-area: details;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
}

.customer-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.25rem;
}

.customer-fields-grid .form-field.full-width {
    grid-column: 1 / -1;
}

.details-fields .info-section-group h4 {
    margin-bottom: 0;
}

.document-accordion-container details {
    border-bottom: 1px solid var(--border-color);
}

.document-accordion-container details:last-of-type {
    border-bottom: none;
}

.document-accordion-container summary {
    padding: 0.65rem 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    transition: background-color 0.2s;
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 0.9rem;
    background-color: #edf5f4;
    color: #3d7672;
}

.document-accordion-container summary::-webkit-details-marker {
    display: none;
}

.document-accordion-container summary:hover {
    background-color: #f0f3f5;
}

.document-accordion-container summary::after {
    font-family: "Font Awesome 6 Free" !important;
    content: '\f067';
    font-weight: 900;
    position: absolute;
    right: 0.9375rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s ease-in-out;
}

.document-accordion-container details[open]>summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.document-accordion-container .documents-checklist {
    border: none;
    max-height: none;
    overflow-y: visible;
}

.accordion-search-container {
    position: relative;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.document-accordion-container p {
    font-size: 0.8rem;
    padding: 1.5rem 0.5rem;
    text-align: center;
    color: #7f8c8d;
}

.accordion-search-container .fas {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
}

.accordion-search-input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.documents-checklist {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

.documents-checklist .checkbox-item {
    display: flex;
    padding: 0.5rem 1rem;
}

.documents-checklist .checkbox-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.documents-checklist .checkbox-item input[type="checkbox"] {
    margin-right: 0.75rem;
}

input[type="checkbox"] {
    width: 1rem !important;
    height: 1rem;
    min-width: 1rem;
    cursor: pointer;
}

.documents-checklist .checkbox-item>label {
    margin-bottom: 0 !important;
    color: #495057 !important;
    cursor: pointer;
    flex-grow: 1;
    font-size: 0.85rem;
}

.documents-checklist .check-all-item {
    font-weight: bold;
    color: var(--text-color);
}

.documents-checklist .accordion-search-input {
    padding-left: 2.5rem !important;
}

.label-doc-icon {
    color: #c5c5c5;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.check-all-item.perm {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
}

#quota-cal-free-container .checkbox-item:not(.check-all-item) {
    flex-direction: column;
}

#quota-cal-free-container .checkbox-item .check-input {
    display: flex;
    align-items: center;
    width: 100%;
}

#quota-cal-free-container .checkbox-item .check-input label {
    cursor: pointer;
    font-size: 0.9rem;
}

#quota-cal-free-container .checkbox-item .info-section-group {
    padding-left: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 0.5rem;
}

.modal-footer {
    padding: 0.9375rem 1.5625rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.modal-footer .form-action-btn {
    margin: 0;
    white-space: nowrap;
}

#search-results-modal .modal-footer {
    min-height: 4.275rem;
    align-items: center;
}

#search-results-modal-content {
    background-color: var(--white-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 80vh;
    max-height: 43.75rem;
    width: 90%;
    max-width: 62.5rem;
    aspect-ratio: auto;
    border-radius: 0.5rem;
    overflow: hidden;
}

#search-results-modal-content .document-modal-body {
    display: flex;
    flex-direction: column;
    padding: 0;
}

#search-results-modal-content .document-modal-body .table-container {
    padding: 0 1.25rem 1.25rem;
}

.search-results-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.2rem 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.filter-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.filter-tag strong {
    color: var(--text-color);
    margin-right: 0.375rem;
}

#edit-search-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.custom-checkbox-container {
    display: block;
    position: relative;
    padding-left: 2.1875rem;
    margin-top: 1.6rem;
    margin-left: 0.2rem;
    cursor: pointer;
    font-size: 0.875rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-weight: 500;
    color: #495057;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1.25rem;
    width: 1.25rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.custom-checkbox-container:hover input~.checkmark {
    background-color: #e9ecef;
}

.custom-checkbox-container input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox-container input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox-container .checkmark:after {
    left: 0.4rem;
    top: 0.1rem;
    width: 0.3125rem;
    height: 0.625rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.grid-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.grid-col-2-2 {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 0.75rem;
}

::placeholder {
    color: #adb2b6;
    font-size: 0.8rem;
}

.gray-box {
    display: grid;
    background-color: #eff6f5;
    padding: 0.6rem 1.75rem;
    border-radius: 0.25rem;
    gap: 0.25rem;
    border: 1.2px solid #dfe8e8;
}

.gray-box span {
    font-size: 0.875rem;
}

.gray-box .tt {
    color: #7f8c8d;
    margin-right: 0.25rem;
}

.gray-box .cn {
    color: #495057;
    font-weight: 500;
}

.sales-doc-box, #cal-job-container .grid-col-2-2 {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.3rem;
}

.delete-box-btn {
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border-radius: 0.3rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    background: #f0f0f0;
    color: #7f8c8d;
}

.delete-box-btn:hover {
    background: #fee3e3;
    color: #d36464;
}

.d-flex {
    display: flex;
}

#view-users-modal .modal-content-bg {
    max-width: 60rem;
    width: 90%;
    height: 90vh;
    max-height: 47rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.view-users-grid {
    display: grid;
    grid-template-columns: 18rem 1fr;
    flex-grow: 1;
    overflow: hidden;
}

.view-users-left-pane {
    background-color: #f8f9fa;
    padding: 2rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
}

.customer-info-box .customer-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.customer-info-box h3 {
    font-size: 1.15rem;
    color: var(--sidebar-bg);
    margin-bottom: 0.5rem;
}

.customer-info-box p {
    font-size: 0.875rem;
    color: #7f8c8d;
    line-height: 1.5;
}

.view-users-right-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background-color: var(--white-color);
}

.view-users-right-pane .pagination-container {
    padding: 1.25rem 2rem;
}

.right-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

#document-usage-modal .right-pane-header {
    justify-content: flex-end;
    border: 0;
}

.right-pane-header-actions {
    display: flex;
}

.right-pane-header.end {
    justify-content: end;
}

#add-user-access-modal .document-modal-header,
.mb-0 {
    margin-bottom: 0;
}

#view-users-modal-body {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

#view-users-modal-body .table-container {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

#view-users-modal-body .pagination-container {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background-color: var(--white-color);
}

.modal-footer-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
    flex-shrink: 0;
}

.modal-footer-bar .form-action-btn {
    margin: 0;
    border-radius: 0.375rem;
}

.view-users-left-pane button {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.view-users-table td:last-child {
    text-align: right;
}


/* Custom Searchable Select */
.searchable-select-wrapper {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    width: 100%;
    padding-right: 2.5rem !important;
    /* Make space for arrow */
}

.searchable-select-wrapper .select-arrow {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: #bdc3c7;
    pointer-events: none;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.searchable-select-wrapper.open .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.searchable-select-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.searchable-select-dropdown li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.searchable-select-dropdown li:hover {
    background-color: #f8f9fa;
}

.searchable-select-dropdown li.no-results {
    color: #7f8c8d;
    cursor: default;
    background-color: transparent;
}

/* Radio button group for Department selection */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.radio-group input[type="radio"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    margin-bottom: 0.1rem;
}

@media (max-width: 48rem) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        width: 16.25rem;
    }

    .dashboard-container.sidebar-mobile-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.2);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .sidebar-collapsed .sidebar {
        width: 16.25rem;
    }

    .sidebar-collapsed .sidebar .menu-text {
        display: inline-block;
    }

    .sidebar-collapsed .sidebar nav ul li a,
    .sidebar-collapsed .sidebar .logout-button,
    .sidebar-collapsed .sidebar .language-selector {
        justify-content: flex-start;
        padding: 1.125rem 1.5625rem;
    }

    .sidebar-collapsed .sidebar .language-selector .fas {
        display: inline-block;
    }

    .sidebar-collapsed .sidebar .language-selector select {
        margin-left: 1.25rem;
        width: 100%;
    }


    .main-content {
        width: 100%;
        transition: margin-left 0.3s ease;
    }

    .header {
        padding: 0 0.9375rem;
    }

    .user-menu span {
        display: none;
    }

    .main-content-panel {
        padding: 0.9375rem;
    }

    .content-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9375rem;
    }

    .tabs {
        width: 100%;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .tabs::-webkit-scrollbar,
    .menu-separator {
        display: none;
    }

    .tab-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .content-body {
        flex-direction: column;
    }

    #setting-content.content-body {
        position: relative;
    }

    #setting-content>.data-panel>.panel-header {
        justify-content: end;
        padding-top: 0;
    }

    #setting-content>.data-panel>.panel-header>h3 {
        display: none;
    }

    .sub-menu {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
    }

    .submenu-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.85rem 1.25rem 0.75rem;
        background-color: var(--white-color);
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
        user-select: none;
        transition: background-color 0.2s;
        line-height: initial;
    }

    .submenu-mobile-header:active {
        background-color: #f9f9f9;
    }

    .submenu-mobile-header span {
        font-weight: 600;
        color: var(--primary-color);
        font-size: 1.1rem;
    }

    .submenu-mobile-header i {
        color: #7f8c8d;
        transition: transform 0.3s ease;
    }

    .sub-menu.expanded .submenu-mobile-header i {
        transform: rotate(180deg);
        color: var(--primary-color);
    }

    .sub-menu.expanded .submenu-mobile-header {
        border-bottom-color: var(--primary-color);
    }

    .sub-menu ul {
        display: none;
        background-color: #fdfdfd;
        border-bottom: 1px solid var(--border-color);
        list-style: none;
        padding: 0;
        max-height: 50vh;
        overflow-y: auto;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
        position: absolute;
        width: 100%;
        z-index: 100;
    }

    .sub-menu.expanded ul {
        display: block;
        animation: slideDown 0.2s ease-out;
    }

    .sub-menu ul li a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f0f0f0;
        border-left: 4px solid transparent;
        font-size: 0.95rem;
        color: #555;
    }

    .sub-menu ul li:last-child a {
        border-bottom: none;
    }

    .sub-menu ul li a.active {
        border-left-color: var(--primary-color);
        color: var(--primary-color);
        font-weight: 600;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .panel-header-full {
        flex-direction: column;
        align-items: stretch;
    }

    .video-modal-content {
        width: 100%;
        max-width: 90%;
        height: auto;
        border-radius: 0;
        aspect-ratio: auto;
    }

    .pagination-container {
        justify-content: center;
        flex-direction: column-reverse;
        gap: 0.8rem;
    }

    .pagination-container .total-info {
        display: block;
        /* Override existing display: none if any */
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .user-details-info-section {
        padding: 0 0 0.5rem;
    }

    .user-details-form {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "details";
        overflow: auto;
    }

    .user-details-info-section {
        grid-template-columns: 1fr;
        overflow-y: visible;
        padding-right: 0;
    }

    .form-actions {
        justify-content: center;
    }

    #add-user-form,
    #add-customer-form {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "details";
        gap: 1.5rem;
    }

    #system-management-content .content-header-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    #system-management-content .content-header {
        display: none;
    }

    #device-details-modal-content,
    #customer-details-modal-content {
        height: 100vh;
        width: 100vw;
        border-radius: 0;
        max-height: none;
        max-width: none;
    }

    .device-details-body-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .details-left-pane {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .details-left-pane-content,
    .details-right-pane {
        overflow-y: visible;
    }

    .view-users-grid {
        grid-template-columns: 1fr;
    }

    .view-users-left-pane,
    .tabs::-webkit-scrollbar,
    .pagination-container .total-info {
        display: none;
    }

    #view-users-modal .modal-content-bg {
        height: 100vh;
        width: 100vw;
        max-height: 100vh;
        max-width: 100vw;
        border-radius: 0;
    }

    .tab-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tab-item:not(.active) {
        font-size: 0;
        gap: 0;
        padding-right: 0.65rem;
    }

    .content-body {
        flex-direction: column;
    }

    .modal-body {
        padding: 0 1.5rem 1.5rem;
    }

    #management-content .data-panel {
        padding: 1.1rem 0.25rem 0;
    }

    #setting-brand-panel.data-panel {
        padding-bottom: 0.25rem;
    }

    .custom-select-wrapper.with-icon select {
        width: 0;
        padding-left: 2rem;
    }
}

#open-task-ex-btn {
    background-color: #5f95b9;
    margin-right: 0;
}

#open-task-ex-btn:hover {
    background-color: #5499C7;
}

#search-results-table-body tr {
    cursor: pointer;
}

.data-table tbody tr.selected {
    background-color: #e1f6f2;
}

.data-table tbody tr.selected:hover {
    background-color: #c5eae3;
}

#add-user-access-modal-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.25rem;
    padding-top: 1rem;
    flex-grow: 1;
}

#add-user-access-modal-body form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    gap: 1rem;
}

#add-user-access-table thead th:first-child,
#add-user-access-table tbody td:first-child {
    width: 1%;
    text-align: center;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: bold;
}

.document-usage-body {
    margin-top: 0 !important;
    padding: 0 1.25rem 1.25rem !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.document-usage-body .table-container {
    border: 1px solid #dfe7e5;
    border-radius: 0.5rem;
    overflow: auto;
    height: 100%;
}

#document-usage-table td {
    vertical-align: middle;
}

#start-job-modal-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

#start-job-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.start-job-btn {
    width: 80%;
    max-width: 20rem;
    padding: 0.8rem 1rem;
    border-radius: 2rem;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#quotation-btn {
    background-color: #3b8d85;
}

#quotation-btn:hover {
    background-color: #31776f;
}

#receive-device-btn {
    background-color: var(--primary-color);
}

#receive-device-btn:hover {
    background-color: #008a80;
}

/* Quotation Modal Styles */
#quotation-modal-content {
    background-color: #f8fafc;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 90vh;
    max-height: 56.25rem;
    width: 95%;
    max-width: 60rem;
    aspect-ratio: auto;
    border-radius: 0.5rem;
    overflow: hidden;
}

.quotation-body-grid {
    display: grid;
    grid-template-columns: 17rem 1fr;
    /* Stepper has fixed width */
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
}

.stepper-pane {
    background-color: var(--white-color);
    padding: 1.5rem 1rem 1.5rem 1.5rem;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.stepper-container {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.step {
    position: relative;
    padding-bottom: 1.5rem;
}

.step:last-child {
    padding-bottom: 0;
}

.step .step-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    cursor: pointer;
}

.step.disabled .step-link {
    cursor: not-allowed;
}


.step-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.step-circle {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: var(--white-color);
    border: 2px solid #e2e8f0;
    z-index: 2;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #94a3b8;
}

.step-line {
    position: absolute;
    left: calc(1.125rem - 1px);
    top: 2.25rem;
    width: 2px;
    height: calc(100% + 0.5rem);
    background-color: #e2e8f0;
    z-index: 1;
    transition: all 0.3s ease;
}

.step:last-child .step-line {
    display: none;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.3s ease;
}

/* Step States */
.step:not(.disabled) .step-link:hover .step-label {
    color: var(--sidebar-bg);
}

.step:not(.disabled) .step-link:hover .step-circle {
    border-color: #94a3b8;
}

.step.completed .step-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}

.step.completed .step-line {
    background-color: var(--primary-color);
}

.step.completed .step-label {
    color: var(--primary-color);
}

.step.completed:not(.disabled) .step-link:hover .step-label {
    color: #008a80;
}

.step.active .step-circle {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--sidebar-bg);
    font-weight: 600;
}


.form-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-pane .right-pane-header {
    justify-content: end;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.65rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
    margin: 0.4rem 0;
}

.form-pane-content {
    padding: 1.5rem 4rem;
    overflow-y: auto;
    flex-grow: 1;
}

.quotation-step-content {
    display: none;
}

.quotation-step-content.active {
    display: block;
}

#quotation-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 1rem;
}

#quotation-form .info-section-group h4 {
    color: var(--text-color);
    font-size: 1rem;
}

#quotation-form .info-section-group .gray-box {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.quotation-device-info div {
    display: flex;
}

.quotation-device-info .tt {
    width: 8rem;
    flex-shrink: 0;
}

.form-pane .modal-footer {
    justify-content: space-between;
    align-items: center;
}

/* Calibration Job Row Styles */
.restore-doc-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #a15057;
    margin-left: 0.65rem;
    font-size: 0.9rem;
    padding-top: 0.1rem;
    transition: color 0.2s;
    vertical-align: middle;
}

.restore-doc-btn:hover {
    color: #893239;
}