.card {
    border-radius: 10px;
    padding: 25px;
}

table input {
    border: none;
    outline: none;
    width: 100%;
    padding: 6px;
    font-size: 13px;
}

table tr:hover {
    background: #f9fbff;
}

th {
    font-size: 12px;
    white-space: nowrap;
}

.error {
    border: 1px solid red !important;
    background: #fff0f0;
}

.serial-error {
    color: red;
    font-size: 11px;
}

.select2-container--default .select2-selection--single {
    height: 34px;
    padding: 4px;
}


.editable {
    border: none;
    background: transparent;
    width: 100%;
}

.editable:focus {
    background: #eef6ff;
    outline: none;
}

/* Editable cells */
.editable-cell {
    cursor: pointer;
    transition: background 0.2s;
}

.editable-cell:hover {
    background: #f1f7ff;
}

/* Input inside table */
.editable-cell input {
    width: 100%;
    font-size: 12px;
    padding: 2px;
}

/* 🔥 Strong grid borders */
#harddiskTable {
    border: 1px solid #dcdcdc;
}

#harddiskTable th,
#harddiskTable td {
    border: 1px solid #e2e2e2;
    /* padding: 6px; */
}

/* 🔥 Header styling */
#harddiskTable thead th {
    background: #f4f6f9;
    font-weight: 600;
    font-size: 12px;
}

/* 🔥 Filter row */
.filter-row input {
    width: 100%;
    font-size: 11px;
    padding: 3px;
    border: 1px solid #ddd;
}

/* 🔥 Row hover */
#harddiskTable tbody tr:hover {
    background: #f9fbff;
}

/* 🔥 Alternate rows */
#harddiskTable tbody tr:nth-child(even) {
    background: #fafafa;
}

/* 🔥 Editable cells */
.editable-cell {
    cursor: pointer;
}

.editable-cell:hover {
    background: #eef6ff;
}

/* 🔥 Prevent wrapping */
#harddiskTable th,
#harddiskTable td {
    white-space: nowrap;
}

/* 🔥 Table container */
.table-container {
    overflow-x: auto;
}

/* 🔥 Sticky Action Column (BODY) */
#harddiskTable td.sticky-col {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 2;
    min-width: 120px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}

/* 🔥 Sticky Header FIX (IMPORTANT) */
.dataTables_scrollHead th.sticky-col,
#harddiskTable thead th.sticky-col {
    position: sticky !important;
    right: 0;
    background: #f4f6f9;
    z-index: 5;
    min-width: 120px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}

/* Hover fix */
#harddiskTable tbody tr:hover td.sticky-col {
    background: #f1f7ff;
}

/* Add Form Shell */
.spare-form-shell {
    background: #fff;
    border: 1px solid #dde5f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.spare-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #e7edf6;
    background: #f8fbff;
}

.spare-form-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1f2a3d;
}

.spare-form-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}

.spare-form-shell form {
    padding: 14px;
}

.spare-add-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.spare-add-table th {
    background: #f1f5fb;
    border-bottom: 1px solid #d7e2f0;
    color: #465a74;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 8px;
}

.spare-add-table td {
    padding: 6px 7px;
    border-color: #e5ebf4;
    background: #fff;
}

.spare-add-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.spare-add-table input {
    width: 100%;
    min-width: 110px;
    padding: 7px 8px;
    border: 1px solid #cfdaea;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    color: #1f2937;
}

.spare-add-table input:focus {
    border-color: #7fa7ef;
    box-shadow: 0 0 0 2px rgba(79, 142, 247, 0.14);
}

.spare-add-table .row-remove-col {
    width: 58px;
    min-width: 58px;
    text-align: center;
}

.spare-add-table .remove {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spare-form-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.spare-form-note {
    font-size: 12px;
    color: #64748b;
}

.spare-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 900px) {
    .spare-form-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .spare-form-tools {
        width: 100%;
    }

    .spare-form-tools .btn {
        width: 100%;
    }

    .spare-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .spare-form-actions {
        width: 100%;
    }

    .spare-form-actions .btn {
        flex: 1;
    }
}

