/* Rack Storage Management — custom styles on top of Bootstrap 5 RTL. */

body {
    background: #f4f6fa;
    font-family: "Cairo", "Segoe UI", system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

.rack-card:hover {
    transform: translateY(-2px);
    transition: transform 0.15s ease;
}

/* ----- Rack slot grid ----- */
.rack-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    margin-top: 1rem;
}

@media (max-width: 991.98px) {
    .rack-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .rack-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.slot {
    aspect-ratio: 1;
    border: 2px dashed #cfd6e0;
    border-radius: 10px;
    background: #fff;
    color: #344;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    font-size: 0.85rem;
    overflow: hidden;
    text-align: center;
    position: relative;
}

.slot:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.slot-pos {
    position: absolute;
    top: 2px;
    inset-inline-start: 6px;
    font-size: 0.7rem;
    color: #99a;
    font-weight: 600;
}

.slot-empty {
    color: #9aa4b2;
}
.slot-empty i {
    font-size: 1.4rem;
    opacity: 0.6;
}

.slot-filled {
    border-style: solid;
    color: #1f2937;
    font-weight: 600;
}
.slot-filled .slot-serial {
    font-size: 0.78rem;
    word-break: break-all;
    padding: 0 4px;
    line-height: 1.2;
    margin-top: 4px;
}

/* ----- Forms / focus ----- */
.scanner-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: #4db2c2;
    box-shadow: 0 0 0 0.2rem rgba(77, 178, 194, 0.15);
}

code {
    background: #f1f3f7;
    color: #d63384;
    padding: 1px 5px;
    border-radius: 4px;
}
