:root {
    --app-bg: #101827;
    --sidebar: rgba(21, 30, 47, 1);
    --sidebar-main-color: #fff;
    --table-border: #1a2131;
    --table-header: #1a2131;
    --app-content-main-color: #fff;
    --sidebar-link: #fff;
    --sidebar-active-link: #1d283c;
    --sidebar-hover-link: #1a2539;
    --action-color: #2869ff;
    --action-color-hover: #6291fd;
    --app-content-secondary-color: #1d283c;
    --filter-reset: #2c394f;
    --filter-shadow: rgba(16, 24, 39, 0.8) 0px 6px 12px -2px,
        rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    --sidebar-width-expanded: 200px;
    --sidebar-width-collapsed: 65px;
}

html.light:root {
    --app-bg: #fff;
    --sidebar: #f3f6fd;
    --app-content-secondary-color: #f3f6fd;
    --app-content-main-color: #1f1c2e;
    --sidebar-link: #1f1c2e;
    --sidebar-hover-link: rgba(195, 207, 244, 0.5);
    --sidebar-active-link: rgba(195, 207, 244, 1);
    --sidebar-main-color: #1f1c2e;
    --filter-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    --table-border: #e9ecef;
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: "Poppins", sans-serif;
    font-size: 1.6rem;
    background-color: var(--app-bg);
    color: var(--app-content-main-color);
    letter-spacing: 1px;
    transition: background 0.2s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    background-color: var(--app-content-secondary-color);
    color: var(--app-content-main-color);
    margin: auto;
    padding: 2.5rem;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 70rem;
    box-shadow: var(--filter-shadow);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

html.light .modal-content {
    background-color: #fff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--table-border);
    margin-bottom: 20px;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-header-logo {
    width: 28px;
    height: 28px;
}

html.light .modal-header {
    border-bottom-color: #eee;
}

.modal-title {
    font-size: 2rem;
    font-weight: 500;
}

.close-button {
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    color: var(--app-content-main-color);
}

.modal-body {
    overflow-y: auto;
    scrollbar-width: none;
    flex-grow: 1;
}

.modal-header-icon {
    font-size: 2.6rem;
    color: var(--action-color);
}

.modal-body form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1.4rem;
}

.modal-body form .form-group {
    margin-bottom: 1.5rem;
}

.modal-body form .form-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.modal-body form input[type="text"],
.modal-body form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--table-border);
    border-radius: 4px;
    background-color: var(--app-bg);
    color: var(--app-content-main-color);
    font-size: 1.4rem;
}

html.light .modal-body form input[type="text"],
html.light .modal-body form textarea {
    background-color: #fff;
    border-color: #ccc;
}

.modal-body form input:focus,
.modal-body form textarea:focus {
    border-color: var(--action-color);
    outline: none;
}

.modal-body form input:disabled {
    background-color: var(--app-bg);
    opacity: 0.6;
    cursor: not-allowed;
}

html.light .modal-body form input:disabled {
    background-color: #e9ecef;
}

#suratModal .form-section {
    background-color: var(--app-bg);
    border: 1px solid var(--table-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

html.dark #suratModal .form-section {
    box-shadow: var(--filter-shadow);
}

#suratModal .form-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

html.light #suratModal .form-section {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.modal-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--table-border);
    margin-top: 2rem;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 1.2rem;
    position: relative;
}

.modal-footer .btn {
    padding: 1rem 2.4rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.4rem;
    transition: all 0.25s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:disabled {
    background-color: #5a6268;
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    right: 20px;
    background-color: #343a40;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 5px);
    right: 30px;
    border-width: 5px;
    border-style: solid;
    border-color: #343a40 transparent transparent transparent;
}

.modal-footer .btn-primary {
    background-color: var(--action-color);
    color: white;
}

.modal-footer .btn-primary:hover {
    background-color: var(--action-color-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(40, 105, 255, 0.3);
}

.modal-footer .btn-secondary {
    background-color: #4a5568;
    color: #e2e8f0;
}

.modal-footer .btn-secondary:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

#suratModal .form-section {
    background-color: var(--app-content-secondary-color);
    border: 1px solid var(--table-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

#suratModal .form-section {
    background-color: var(--app-bg);
    border: 1px solid var(--table-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

#suratModal .form-section:last-of-type {
    margin-bottom: 0;
}

#suratModal .form-section h3 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    color: var(--action-color);
    border-bottom: 1px solid var(--table-border);
}

html.light #suratModal .form-section {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

html.dark #suratModal .form-section {
    box-shadow: var(--filter-shadow);
}

html.light #suratModal .form-section {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.detail-split-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.detail-section {
    background-color: var(--app-bg);
    border: 1px solid var(--table-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

html.light .detail-section {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

html.dark .detail-section {
    box-shadow: var(--filter-shadow);
}

.detail-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.detail-section h3 {
    font-size: 1.8rem;
    color: var(--action-color);
    border-bottom: 1px solid var(--table-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.detail-item {
    display: flex;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.6;
}

.detail-item dt {
    font-weight: 500;
    color: var(--app-content-main-color);
    opacity: 0.7;
    width: 150px;
    flex-shrink: 0;
}

.detail-item dd {
    flex-grow: 1;
    font-weight: 400;
}

.detail-barang-box {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 1rem;
}

.detail-barang-icon {
    font-size: 4rem;
    color: var(--action-color);
    flex-shrink: 0;
}

.detail-barang-info .header {
    font-size: 1.8rem;
    font-weight: 600;
}

.detail-barang-info .subheader {
    font-size: 1.4rem;
    opacity: 0.7;
}

.pihak-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pihak-nama {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}

.pihak-subinfo {
    font-size: 1.3rem;
    color: var(--app-content-main-color);
    opacity: 0.7;
    margin: 0;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 1.2rem;
    margin-top: 0.4rem;
}

.is-invalid {
    border-color: #dc3545 !important;
}

#barang-info-box {
    display: none;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background-color: var(--app-bg);
    border: 1px dashed var(--action-color);
    border-radius: 6px;
}

html.light #barang-info-box {
    background-color: #f0f8ff;
}

#barang-info-box p {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

#barang-info-box strong {
    font-weight: 600;
}

#barang-info-box .error {
    color: #ffc107;
}

#barang-info-box .used {
    color: #dc3545;
}

#dashboard-page {
    height: 100vh;
    display: flex;
}

.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
}

.pihak-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    font-weight: 500;
    width: 100%;
}

.panah-serah-terima {
    color: var(--action-color);
    flex-shrink: 0;
}

.pihak-pemberi,
.pihak-penerima {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-surat-mobile {
    font-size: 1.2rem;
    opacity: 0.7;
    text-align: right;
    width: 100%;
    margin-bottom: 4px;
}

.asset-separator-mobile {
    opacity: 0.5;
    margin: 0 0.5rem;
}

.sidebar {
    flex-basis: var(--sidebar-width-expanded);
    max-width: var(--sidebar-width-expanded);
    min-width: var(--sidebar-width-expanded);
    flex-shrink: 0;
    background-color: var(--sidebar);
    display: flex;
    flex-direction: column;
    transition: min-width 0.3s ease-in-out, max-width 0.3s ease-in-out,
        flex-basis 0.3s ease-in-out;
    position: relative;
}

.sidebar.collapsed {
    min-width: var(--sidebar-width-collapsed);
    max-width: var(--sidebar-width-collapsed);
    flex-basis: var(--sidebar-width-collapsed);
}

.sidebar.collapsed .sidebar-header .app-icon {
    opacity: 0;
    transform: scale(0);
    width: auto;
    overflow: hidden;
    margin-right: 0;
}

.sidebar.collapsed .sidebar-list-item a span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    margin-left: -10px;
}

.sidebar.collapsed .sidebar-list-item a {
    justify-content: center;
}

.sidebar.collapsed .sidebar-list-item a svg {
    margin-right: 0;
}

.sidebar.collapsed .account-info {
    justify-content: center;
}

.sidebar.collapsed .account-info-name {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar.collapsed .sidebar-header .app-icon {
    display: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    min-height: 50px;
    margin-bottom: 20px;
    margin-top: 5px;
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    overflow: hidden;
    transition: opacity 0.2s ease-in-out 0.1s, transform 0.2s ease-in-out 0.1s;
}

.app-icon .app-logo-svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.app-name-text {
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.2s ease-in-out 0.1s, width 0.2s ease-in-out 0.1s;
}

.sidebar-list {
    list-style-type: none;
}

.sidebar-list-item {
    position: relative;
    margin-bottom: 4px;
}

.sidebar-list-item a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    color: var(--sidebar-link);
    text-decoration: none;
    font-size: 14px;
    line-height: 24px;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-list-item a span {
    transition: opacity 0.2s ease-in-out 0.1s, width 0.2s ease-in-out 0.1s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-list-item svg {
    margin-right: 8px;
    flex-shrink: 0;
    transition: margin-right 0.3s ease-in-out;
}

.sidebar-list-item.active {
    background-color: var(--sidebar-active-link);
}

.sidebar-list-item.active:before {
    content: "";
    position: absolute;
    right: 0;
    background-color: var(--action-color);
    height: 100%;
    width: 4px;
}

.sidebar-list-item:hover {
    background-color: var(--sidebar-hover-link);
}

.account-info {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-top: auto;
}

.account-info-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.account-info-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-info-name {
    font-size: 14px;
    color: var(--sidebar-main-color);
    margin: 0 8px;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-content {
    padding: 16px;
    flex: 1;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    min-width: 0;
}

#barang-info-box {
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px dashed;
    line-height: 1.6;
}

#barang-info-box h4 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#barang-info-box p {
    margin: 0.4rem 0;
    font-size: 1.4rem;
}

.info-box-loading {
    border-color: var(--action-color-hover);
    color: var(--action-color-hover);
}

.info-box-success {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.info-box-error {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.app-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.app-content-headerText {
    color: var(--app-content-main-color);
    font-size: 30px;
    line-height: 32px;
    margin: 0;
    padding-bottom: 20px;
    padding-top: 10px;
}

.app-content-header-actions-right {
    display: flex;
    align-items: center;
}

.mode-switch.action-button {
    margin-right: 8px;
}

.mode-switch.action-button svg {
    width: 20px;
    height: 20px;
}

.mode-switch .moon {
    fill: var(--app-content-main-color);
}

.mode-switch.active .moon {
    fill: none;
}

.app-content-headerButton {
    background-color: var(--action-color);
    color: #fff;
    font-size: 14px;
    line-height: 24px;
    border: none;
    border-radius: 4px;
    height: 32px;
    padding: 0 16px;
    transition: 0.2s;
    cursor: pointer;
    flex-shrink: 0;
}

.app-content-headerButton:hover {
    background-color: var(--action-color-hover);
}

.app-content-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem 0.4rem;
    gap: 1.6rem;
}

.search-bar-container {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.search-bar {
    background-color: var(--app-content-secondary-color);
    border: 1px solid var(--app-content-secondary-color);
    color: var(--app-content-main-color);
    font-size: 1.4rem;
    padding: 0.4rem 1rem 0.4rem 3.2rem;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: left 10px center;
    width: 100%;
}

html.light .search-bar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231f1c2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.search-bar-container .search-bar {
    padding-right: 35px;
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    color: var(--app-content-main-color);
    cursor: pointer;
    font-size: 2.2rem;
    font-weight: bold;
    padding: 0 6px;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 5;
}

.clear-search-btn:hover {
    color: #e74c3c;
}

html.light .clear-search-btn {
    color: #6c757d;
}

html.light .clear-search-btn:hover {
    color: #c0392b;
}

.action-button {
    border-radius: 4px;
    height: 32px;
    background-color: var(--app-content-secondary-color);
    border: 1px solid var(--app-content-secondary-color);
    display: flex;
    align-items: center;
    color: var(--app-content-main-color);
    font-size: 14px;
    padding: 0 8px;
    cursor: pointer;
    transition: 0.2s;
}

.action-button:hover {
    border-color: var(--action-color-hover);
}

.action-button.add-surat-btn {
    background-color: var(--action-color);
    color: white;
    border: none;
    padding: 0 1.6rem;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.4rem;
    cursor: pointer;
}

.products-area-wrapper {
    width: 100%;
    flex-grow: 1;
    overflow: auto;
    padding: 0 4px;
}

.products-area-wrapper.tableView {
    display: flex;
    flex-direction: column;
}

.tableView .products-header {
    background-color: var(--app-content-secondary-color);
    display: flex;
    align-items: center;
    border-radius: 4px;
    position: sticky;
    top: 0;
    min-width: 1400px;
    z-index: 10;
    border-bottom: 2px solid var(--action-color);
    font-weight: 500;
}

html.light .tableView .products-header {
    background-color: #f1f3f5;
    border-bottom-color: #dee2e6;
}

.tableView #productTableRowsContainer .products-row:nth-child(even) {
    background-color: var(--table-border);
}

html.light .tableView #productTableRowsContainer .products-row:nth-child(even) {
    background-color: #f9f9f9;
}

.tableView #productTableRowsContainer .products-row:hover {
    background-color: var(--sidebar-active-link);
    transition: background-color 0.2s ease-in-out;
}

html.light .tableView #productTableRowsContainer .products-row:hover {
    background-color: #e9ecef;
}

.tableView .products-row {
    display: flex;
    align-items: center;
    border-radius: 4px;
    min-width: 1400px;
}

.tableView .product-cell {
    padding: 8px 12px;
    color: var(--app-content-main-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tableView .product-cell.cell-no {
    flex: 0 0 60px;
    min-width: 60px;
    justify-content: center;
}

.tableView .product-cell.cell-no-surat {
    flex: 1 1 180px;
    min-width: 140px;
}

.tableView .product-cell.cell-penerima {
    flex: 1 1 200px;
    min-width: 160px;
}

.tableView .product-cell.cell-pemberi {
    flex: 1 1 200px;
    min-width: 160px;
}

.tableView .product-cell.cell-merek-jenis {
    flex: 1 1 200px;
    min-width: 160px;
}

.tableView .product-cell.cell-asset {
    flex: 1 1 200px;
    min-width: 160px;
}

.tableView .product-cell.cell-serial-number {
    flex: 1 1 180px;
    min-width: 140px;
}

.tableView .product-cell.cell-aksi {
    flex: 0 0 210px;
    min-width: 210px;
    justify-content: center;
    gap: 8px;
    overflow: visible;
}

.action-btn-table {
    padding: 6px 12px;
    margin: 0 4px;
    border: 1px solid;
    background-color: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-btn-table:hover {
    transform: translateY(-2px);
}

.action-btn-table.download-btn {
    border-color: #3498db;
    color: #3498db;
    text-decoration: none;
}

.action-btn-table.download-btn:hover {
    background-color: #3498db;
    color: #fff;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.action-btn-table.detail-btn {
    border-color: #5cb85c;
    color: #5cb85c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.action-btn-table.detail-btn:hover {
    background-color: #5cb85c;
    color: #fff;
    box-shadow: 0 4px 10px rgba(92, 184, 92, 0.3);
}

.action-btn-table.delete-btn {
    border-color: #e74c3c;
    color: #e74c3c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.action-btn-table.delete-btn:hover {
    background-color: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.action-btn-table.edit-btn {
    border-color: #27ae60;
    color: #27ae60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.action-btn-table.edit-btn:hover {
    background-color: #27ae60;
    color: #fff;
}

.action-btn-table.delete-btn {
    border-color: #e74c3c;
    color: #e74c3c;
}

.action-btn-table.delete-btn:hover {
    background-color: #e74c3c;
    color: #fff;
}

.action-btn-table.download-btn {
    border-color: #3498db;
    color: #3498db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.action-btn-table.download-btn:hover {
    background-color: #3498db;
    color: #fff;
}

.products-header .sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

.products-header .sortable-header::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M8 9l4-4 4 4M16 15l-4 4-4-4'/%3E%3C/svg%3E");
}

html.light .products-header .sortable-header::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1c2e' stroke-width='2'%3E%3Cpath d='M8 9l4-4 4 4M16 15l-4 4-4-4'/%3E%3C/svg%3E");
}

.products-header .sortable-header.sorted-asc::after {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232869ff' stroke-width='2.5'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E");
}

.products-header .sortable-header.sorted-desc::after {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232869ff' stroke-width='2.5'%3E%3Cpath d='M12 5v14M19 12l-7 7-7-7'/%3E%3C/svg%3E");
}

.table-footer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px;
    font-size: 1.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 16px;
}

.table-footer-controls .footer-section {
    display: flex;
    align-items: center;
}

.table-footer-controls .footer-left {
    justify-content: flex-start;
    flex: 1;
    min-width: 220px;
}

.table-footer-controls .rows-per-page-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-footer-controls .rows-per-page-wrapper label {
    font-weight: 500;
    white-space: nowrap;
}

#rows-per-page-select {
    padding: 6px 12px;
    border: 1px solid var(--table-border);
    background-color: var(--app-bg);
    color: var(--app-content-main-color);
}

.table-footer-controls .footer-center {
    justify-content: center;
    gap: 4px;
    flex-grow: 2;
}

.table-footer-controls .pagination-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--table-border);
    background-color: transparent;
    color: var(--app-content-main-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.table-footer-controls .pagination-btn:hover:not(.active):not(:disabled) {
    background-color: var(--sidebar-active-link);
    border-color: var(--action-color);
}

.table-footer-controls .pagination-btn.active {
    background-color: var(--action-color);
    border-color: var(--action-color);
    color: #fff;
    cursor: default;
}

.table-footer-controls .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.table-footer-controls .footer-right {
    justify-content: flex-end;
    flex: 1;
    min-width: 200px;
}

.rows-per-page-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#rows-per-page-select {
    padding: 6px 12px;
    border: 1px solid var(--table-border);
    background-color: var(--app-bg);
    color: var(--app-content-main-color);
}

.pagination-buttons {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--table-border);
    background-color: transparent;
    color: var(--app-content-main-color);
    border-radius: 4px;
    cursor: pointer;
}

.pagination-btn.active {
    background-color: var(--action-color);
    border-color: var(--action-color);
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.burger-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 28px;
    z-index: 10;
    flex-shrink: 0;
}

.burger-button span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--app-content-main-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.burger-button.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-button.active span:nth-child(2) {
    opacity: 0;
}

.burger-button.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#mobile-burger-menu {
    display: none;
}

.form-group {
    position: relative;
}

.invalid-feedback {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(5px);
    white-space: nowrap;
}

.invalid-feedback::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 20px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #e74c3c transparent;
}

.form-group .is-invalid:hover + .invalid-feedback,
.form-group .is-invalid:focus + .invalid-feedback {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#barang-info-box.info-box-error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px dashed #e74c3c;
    text-align: center;
    padding: 2rem;
}

#barang-info-box.info-box-error h4 {
    margin: 0 0 0.8rem 0;
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: 600;
}

#barang-info-box.info-box-error i {
    margin-right: 0.8rem;
}

#barang-info-box.info-box-error p {
    font-size: 1.3rem;
    opacity: 0.8;
    line-height: 1.5;
    margin: 0;
}

.mobile-card-view {
    display: none;
}

@media screen and (max-width: 768px),
    screen and (orientation: landscape) and (max-height: 500px) {
    .tableView .products-header,
    .desktop-view {
        display: none;
    }

    .app-content {
        padding: 0 16px 16px 16px;
    }

    .app-content-header {
        padding-top: 16px;
    }

    .app-content-headerText {
        font-size: 1.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        padding-top: 20px;
        padding-bottom: none;
    }

    .inventory-summary-container,
    .products-area-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .app-content-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-left: 0;
        padding-right: 0;
    }

    .app-content-actions .search-bar-container {
        order: 1;
        max-width: none;
        margin-right: 0;
    }

    .app-content-actions .app-content-actions-buttons {
        order: 2;
        display: flex;
        justify-content: stretch;
        gap: 10px;
        padding-right: 1rem;
    }

    .app-content-actions-buttons .action-button,
    .app-content-actions-buttons .filter-button-wrapper {
        flex-grow: 1;
        flex-basis: 0;
        justify-content: center;
        margin-left: 0;
    }

    .app-content-actions-buttons .action-button-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .app-content-actions-buttons .filter-button-wrapper .action-button.filter {
        width: 100%;
    }

    .app-content-actions .search-bar {
        max-width: none;
    }

    .products-area-wrapper.tableView {
        overflow: visible;
    }

    .tableView .products-header {
        display: none;
    }

    .tableView .products-row {
        display: block;
        padding: 2.5rem;
        margin-bottom: 2rem;
        border-radius: 8px;
        background-color: var(--app-content-secondary-color);
        box-shadow: var(--filter-shadow);
        border-left: 4px solid var(--action-color);
    }

    html.light .tableView .products-row {
        background-color: #f9f9f9;
        border: 1px solid #eee;
        border-left: 4px solid var(--action-color);
    }

    .mobile-card-view {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
    }

    .mobile-card-content {
        font-weight: 400;
        font-size: 1.5rem;
        text-align: left;
        color: var(--app-content-main-color);
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .mobile-card-content .pihak-container {
        text-align: center;
    }

    .card-actions {
        margin-top: 0.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--table-border);
    }

    .card-actions .action-buttons-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .card-actions .action-buttons-wrapper.is-super-admin-actions {
        grid-template-columns: 1fr 1fr;
    }

    .tableView .product-cell.cell-no-surat,
    .tableView .product-cell.cell-penerima,
    .tableView .product-cell.cell-pemberi,
    .tableView .product-cell.cell-asset,
    .tableView .product-cell.cell-serial-number {
        display: none !important;
    }

    .tableView .product-cell.cell-pihak-info,
    .tableView .product-cell.cell-asset-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .tableView .product-cell.cell-aksi .action-buttons-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .tableView .product-cell[data-label]::before {
        display: none;
    }

    .tableView .product-cell.cell-merek-jenis {
        font-weight: 100;
        margin-top: 1rem;
    }

    .tableView .product-cell.cell-asset-info {
        align-items: flex-start;
        font-size: 1.3rem;
        opacity: 0.8;
    }

    .tableView .product-cell.cell-aksi {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
        border-top: 1px solid var(--table-border);
    }

    .action-btn-table span {
        margin-left: 8px;
    }

    .tableView
        .product-cell.cell-aksi
        .action-buttons-wrapper.is-super-admin-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    html.light .tableView .product-cell[data-label]::before {
        color: #6c757d;
    }

    .tableView .product-cell.cell-no {
        display: none;
    }

    .tableView .product-cell.cell-aksi {
        justify-content: center;
        padding-top: 1.5rem;
        margin-top: 1rem;
    }

    .tableView .product-cell.cell-aksi .action-btn-table {
        width: 100%;
        padding: 12px 10px;
    }

    .app-content-actions .search-bar-container {
        order: 1;
        max-width: none;
    }

    .app-content-actions .app-content-actions-buttons {
        order: 2;
        display: flex;
        justify-content: stretch;
        gap: 10px;
    }

    .app-content-actions-buttons .add-asset-btn,
    .app-content-actions-buttons .filter-button-wrapper {
        flex-grow: 1;
        flex-basis: 0;
        margin-left: 0;
    }

    .app-content-actions-buttons .filter-button-wrapper .action-button.filter {
        width: 100%;
    }

    .table-footer-controls {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .table-footer-controls .footer-section {
        width: 100%;
        justify-content: center;
    }

    .modal-content,
    .modal-overlay .modal-content-wrapper {
        width: calc(100% - 2.5rem);
        max-width: 450px;
        margin: 1.25rem;
        padding: 1.5rem;
        max-height: calc(100% - 2.5rem);
    }

    #deviceInfoModal .asset-detail-content .info-item,
    #userHistoryModal .history-info-item,
    #serahTerimaAsetModal .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 1.2rem;
    }

    #deviceInfoModal .asset-detail-content .info-item dt,
    #userHistoryModal .history-info-item dt,
    #serahTerimaAsetModal .info-item dt {
        min-width: auto;
        font-weight: 500;
        font-size: 1.3rem;
        color: var(--color-neutral-light);
    }

    #deviceInfoModal .asset-detail-content .info-item dd,
    #userHistoryModal .history-info-item dd,
    #serahTerimaAsetModal .info-item dd {
        margin-left: 0;
        font-weight: 600;
        font-size: 1.4rem;
        color: var(--color-text-light);
        word-break: break-word;
    }

    #userHistoryModal .history-info-item dt::after,
    #serahTerimaAsetModal .info-item dt::after {
        display: none;
    }

    #deviceInfoModal .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #deviceInfoModal .action-buttons .btn-action {
        width: 100%;
        justify-content: center;
    }

    .modal-title {
        font-size: 1.8rem;
    }

    .modal-title::before {
        font-size: 1.7rem;
    }

    #deviceInfoModal .device-details-info-header {
        margin-bottom: 1.5rem;
    }

    #deviceInfoModal .device-image {
        font-size: 4rem;
        margin-right: 1.5rem;
    }

    #deviceInfoModal .device-name {
        font-size: 1.6rem;
    }

    .morph-modal-body {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .morph-modal-body::-webkit-scrollbar {
        display: none;
    }

    .tableView .products-header {
        min-width: 0px;
    }

    .tableView .products-row {
        min-width: 0px;
    }
}

@media screen and (min-width: 769px) {
    .product-cell.cell-pihak-info {
        display: none !important;
    }

    .product-cell.cell-asset-info {
        display: none !important;
    }

    .desktop-view {
        display: contents;
    }
}

@media screen and (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

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

    #mobile-burger-menu {
        display: flex;
    }

    body.sidebar-open-overlay::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }

    .sidebar.collapsed {
        min-width: var(--sidebar-width-expanded);
        max-width: var(--sidebar-width-expanded);
    }

    .sidebar.collapsed .sidebar-list-item a span,
    .sidebar.collapsed .app-icon {
        opacity: 1;
        width: auto;
        margin-left: 0;
        transform: none;
    }

    .sidebar.collapsed .sidebar-header .app-icon,
    .sidebar.collapsed .sidebar-list-item a svg,
    .sidebar.collapsed .account-info-name,
    .sidebar.collapsed .account-info-more {
        display: flex;
    }

    .app-content {
        margin-left: 0;
    }

    .app-content-header {
        gap: 16px;
    }

    #burger-menu {
        display: none;
    }

    #mobile-burger-menu {
        display: flex;
    }

    .app-content-headerText {
        flex-grow: 1;
        margin: 0;
    }

    body.sidebar-open-overlay::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }
}

.burger-button {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger-button span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--app-content-main-color);
    border-radius: 3px;
    transition: all 0.3s;
}
